Class: Alphred::Items
- Inherits:
-
Array
- Object
- Array
- Alphred::Items
- Defined in:
- lib/alphred/items.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*items) ⇒ Items
constructor
A new instance of Items.
- #to_json(options = nil) ⇒ Object
Constructor Details
#initialize(*items) ⇒ Items
Returns a new instance of Items.
13 14 15 16 |
# File 'lib/alphred/items.rb', line 13 def initialize(*items) @items = items super(@items) end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
11 12 13 |
# File 'lib/alphred/items.rb', line 11 def items @items end |
Class Method Details
.[](*args) ⇒ Object
7 8 9 |
# File 'lib/alphred/items.rb', line 7 def self.[](*args) new(*args) end |
Instance Method Details
#to_json(options = nil) ⇒ Object
18 19 20 |
# File 'lib/alphred/items.rb', line 18 def to_json(=nil) { items: items }.to_json() end |