class ListContainer

Attributes

block[RW]
lists[RW]

Public Class Methods

new(&block) click to toggle source
# File lib/rbbt/rest/entity/list_container.rb, line 3
def initialize(&block)
  @lists = []
  @block = block
end

Public Instance Methods

add(list_id, list = nil, text = nil, options = {}, &block) click to toggle source
# File lib/rbbt/rest/entity/list_container.rb, line 8
def add(list_id, list = nil, text = nil, options = {}, &block)
  text, options, list = list, text, block if  block_given?
  options, text = text, options if Hash === text

  if list and (Proc === list or list.any?)
    @lists << [list_id, list, text, options]
  end
end