Skip to content
This repository has been archived by the owner on Dec 30, 2018. It is now read-only.

Commit

Permalink
add default build callback and make lambda optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikh committed Jan 6, 2010
1 parent 384c096 commit a2d657e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/weechat/bar.rb
Expand Up @@ -47,7 +47,12 @@ def find(name)
alias_method :from_name, :find
end # eigenclass

def build(window)
""
end

def initialize(name, &build_callback)
build_callback ||= method(:build)
id = self.class.compute_free_id
@ptr = Weechat.bar_item_new(name, "bar_build_callback", id.to_s)
if @ptr.empty?
Expand Down

0 comments on commit a2d657e

Please sign in to comment.