Class: Solon::Basket

Inherits:
Object
  • Object
show all
Defined in:
lib/solon/basket.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#itemsObject

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_dataObject Also known as: to_s



9
10
11
# File 'lib/solon/basket.rb', line 9

def to_post_data
  "#{@items.length}:" + @items.join(':')
end