Class: AppleStoreInventoryChecker::Result
- Inherits:
-
Object
- Object
- AppleStoreInventoryChecker::Result
- Defined in:
- lib/apple_store_inventory_checker/result.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#distance ⇒ Object
Returns the value of attribute distance.
-
#in_stock ⇒ Object
writeonly
Sets the attribute in_stock.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#product ⇒ Object
Returns the value of attribute product.
-
#product_id ⇒ Object
readonly
Returns the value of attribute product_id.
-
#state ⇒ Object
Returns the value of attribute state.
-
#store ⇒ Object
Returns the value of attribute store.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #in_stock? ⇒ Boolean
-
#initialize(product_id:) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(product_id:) ⇒ Result
Returns a new instance of Result.
15 16 17 |
# File 'lib/apple_store_inventory_checker/result.rb', line 15 def initialize(product_id:) @product_id = product_id end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/apple_store_inventory_checker/result.rb', line 3 def city @city end |
#distance ⇒ Object
Returns the value of attribute distance.
4 5 6 |
# File 'lib/apple_store_inventory_checker/result.rb', line 4 def distance @distance end |
#in_stock=(value) ⇒ Object (writeonly)
Sets the attribute in_stock
13 14 15 |
# File 'lib/apple_store_inventory_checker/result.rb', line 13 def in_stock=(value) @in_stock = value end |
#phone ⇒ Object
Returns the value of attribute phone.
5 6 7 |
# File 'lib/apple_store_inventory_checker/result.rb', line 5 def phone @phone end |
#product ⇒ Object
Returns the value of attribute product.
6 7 8 |
# File 'lib/apple_store_inventory_checker/result.rb', line 6 def product @product end |
#product_id ⇒ Object (readonly)
Returns the value of attribute product_id.
11 12 13 |
# File 'lib/apple_store_inventory_checker/result.rb', line 11 def product_id @product_id end |
#state ⇒ Object
Returns the value of attribute state.
7 8 9 |
# File 'lib/apple_store_inventory_checker/result.rb', line 7 def state @state end |
#store ⇒ Object
Returns the value of attribute store.
8 9 10 |
# File 'lib/apple_store_inventory_checker/result.rb', line 8 def store @store end |
#url ⇒ Object
Returns the value of attribute url.
9 10 11 |
# File 'lib/apple_store_inventory_checker/result.rb', line 9 def url @url end |
Instance Method Details
#in_stock? ⇒ Boolean
19 20 21 |
# File 'lib/apple_store_inventory_checker/result.rb', line 19 def in_stock? @in_stock end |