Class: KeywordsEverywhere::List
- Inherits:
-
Object
- Object
- KeywordsEverywhere::List
- Extended by:
- Forwardable
- Defined in:
- lib/keywords_everywhere/list.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ List
constructor
A new instance of List.
- #to_items ⇒ Object
Constructor Details
#initialize(data) ⇒ List
Returns a new instance of List.
10 11 12 |
# File 'lib/keywords_everywhere/list.rb', line 10 def initialize(data) @items = data end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
6 7 8 |
# File 'lib/keywords_everywhere/list.rb', line 6 def items @items end |
Class Method Details
.to_items(data) ⇒ Object
14 15 16 |
# File 'lib/keywords_everywhere/list.rb', line 14 def self.to_items(data) data.map {|d| Item.new(d)} end |
Instance Method Details
#to_items ⇒ Object
18 19 20 |
# File 'lib/keywords_everywhere/list.rb', line 18 def to_items items.map {|d| Item.new(d)} end |