Class: ItemBuilderMwh::Modes::Quantity::Base
- Inherits:
-
Object
- Object
- ItemBuilderMwh::Modes::Quantity::Base
- Defined in:
- lib/item_builder_mwh/modes/quantity/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#available_quantity ⇒ Object
readonly
Returns the value of attribute available_quantity.
-
#listing ⇒ Object
readonly
Returns the value of attribute listing.
-
#local_qty ⇒ Object
readonly
Returns the value of attribute local_qty.
Instance Method Summary collapse
-
#initialize(listing, available_quantity, local_qty) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(listing, available_quantity, local_qty) ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 16 17 |
# File 'lib/item_builder_mwh/modes/quantity/base.rb', line 11 def initialize(listing, available_quantity, local_qty) raise 'listing is not set' if listing.nil? @listing = listing @available_quantity = available_quantity @local_qty = local_qty end |
Instance Attribute Details
#available_quantity ⇒ Object (readonly)
Returns the value of attribute available_quantity.
8 9 10 |
# File 'lib/item_builder_mwh/modes/quantity/base.rb', line 8 def available_quantity @available_quantity end |
#listing ⇒ Object (readonly)
Returns the value of attribute listing.
7 8 9 |
# File 'lib/item_builder_mwh/modes/quantity/base.rb', line 7 def listing @listing end |
#local_qty ⇒ Object (readonly)
Returns the value of attribute local_qty.
9 10 11 |
# File 'lib/item_builder_mwh/modes/quantity/base.rb', line 9 def local_qty @local_qty end |