Class: Fassbinder::SellerBuilder
- Inherits:
-
Object
- Object
- Fassbinder::SellerBuilder
- Defined in:
- lib/fassbinder/seller_builder.rb
Instance Attribute Summary collapse
-
#seller ⇒ Object
readonly
Returns the value of attribute seller.
Instance Method Summary collapse
- #add_location(hash) ⇒ Object
- #id=(id) ⇒ Object
-
#initialize ⇒ SellerBuilder
constructor
A new instance of SellerBuilder.
- #name=(name) ⇒ Object
- #rating=(rating) ⇒ Object
Constructor Details
#initialize ⇒ SellerBuilder
Returns a new instance of SellerBuilder.
5 6 7 |
# File 'lib/fassbinder/seller_builder.rb', line 5 def initialize @seller = Kosher::Seller.new end |
Instance Attribute Details
#seller ⇒ Object (readonly)
Returns the value of attribute seller.
3 4 5 |
# File 'lib/fassbinder/seller_builder.rb', line 3 def seller @seller end |
Instance Method Details
#add_location(hash) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/fassbinder/seller_builder.rb', line 21 def add_location(hash) location = Kosher::Location.new location.country = hash['CountryCode'] location.state = hash['StateCode'] @seller.location = location end |
#id=(id) ⇒ Object
9 10 11 |
# File 'lib/fassbinder/seller_builder.rb', line 9 def id=(id) @seller.id = id end |
#name=(name) ⇒ Object
13 14 15 |
# File 'lib/fassbinder/seller_builder.rb', line 13 def name=(name) @seller.name = name end |
#rating=(rating) ⇒ Object
17 18 19 |
# File 'lib/fassbinder/seller_builder.rb', line 17 def () @seller. = .to_f end |