Class: Shoehorn::HelperCollectionSet
- Inherits:
-
Object
- Object
- Shoehorn::HelperCollectionSet
- Defined in:
- lib/shoehorn/helper_collection_set.rb
Instance Attribute Summary collapse
-
#collections ⇒ Object
Returns the value of attribute collections.
Instance Method Summary collapse
-
#initialize(view, items) ⇒ HelperCollectionSet
constructor
A new instance of HelperCollectionSet.
Constructor Details
#initialize(view, items) ⇒ HelperCollectionSet
Returns a new instance of HelperCollectionSet.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/shoehorn/helper_collection_set.rb', line 5 def initialize(view, items) @collections = {} items.each do |item| @collections[item] = Shoehorn::HelperCollection.new(view) instance_eval <<-EOF def#{item} yield @collections[#{item.inspect} ] end EOF end end |
Instance Attribute Details
#collections ⇒ Object
Returns the value of attribute collections.
3 4 5 |
# File 'lib/shoehorn/helper_collection_set.rb', line 3 def collections @collections end |