Sha256: b8a0ba3a0a0867db34a850e2ec90188f6af73eb0e42e32a0467058752f93fb25

Contents?: true

Size: 560 Bytes

Versions: 149

Compression:

Stored size: 560 Bytes

Contents

class ListContainer
  attr_accessor :lists, :block
  def initialize(&block)
    @lists = []
    @block = block
  end

  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

end

module EntityRESTHelpers
  def list_container_render(container)
    partial_render('entity_partials/list_container', :container => container)
  end
end

Version data entries

149 entries across 149 versions & 1 rubygems

Version Path
rbbt-rest-2.0.1 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-2.0.0 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.9.1 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.9.0 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.157 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.156 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.155 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.154 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.152 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.151 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.150 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.148 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.147 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.146 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.145 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.144 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.143 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.142 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.140 lib/rbbt/rest/entity/list_container.rb
rbbt-rest-1.8.139 lib/rbbt/rest/entity/list_container.rb