Class: Solon::Basket
- Inherits:
-
Object
- Object
- Solon::Basket
- Defined in:
- lib/solon/basket.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Basket
constructor
A new instance of Basket.
- #to_post_data ⇒ Object (also: #to_s)
Constructor Details
#initialize(*args) ⇒ Basket
Returns a new instance of Basket.
5 6 7 |
# File 'lib/solon/basket.rb', line 5 def initialize(*args) @items = args end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
3 4 5 |
# File 'lib/solon/basket.rb', line 3 def items @items end |
Instance Method Details
#to_post_data ⇒ Object Also known as: to_s
9 10 11 |
# File 'lib/solon/basket.rb', line 9 def to_post_data "#{@items.length}:" + @items.join(':') end |