Class: FakeHelu
- Inherits:
-
Object
- Object
- FakeHelu
- Defined in:
- lib/project/fake_helu.rb
Instance Attribute Summary collapse
-
#fail ⇒ Object
Returns the value of attribute fail.
-
#product_id ⇒ Object
readonly
Returns the value of attribute product_id.
-
#restore ⇒ Object
Returns the value of attribute restore.
-
#storage ⇒ Object
Returns the value of attribute storage.
-
#winning ⇒ Object
Returns the value of attribute winning.
Instance Method Summary collapse
- #bought? ⇒ Boolean
- #buy ⇒ Object
- #close ⇒ Object
- #fake_fail ⇒ Object
-
#initialize(product_id) ⇒ FakeHelu
constructor
A new instance of FakeHelu.
Constructor Details
#initialize(product_id) ⇒ FakeHelu
Returns a new instance of FakeHelu.
5 6 7 |
# File 'lib/project/fake_helu.rb', line 5 def initialize(product_id) @produc_id = product_id end |
Instance Attribute Details
#fail ⇒ Object
Returns the value of attribute fail.
3 4 5 |
# File 'lib/project/fake_helu.rb', line 3 def fail @fail end |
#product_id ⇒ Object (readonly)
Returns the value of attribute product_id.
2 3 4 |
# File 'lib/project/fake_helu.rb', line 2 def product_id @product_id end |
#restore ⇒ Object
Returns the value of attribute restore.
3 4 5 |
# File 'lib/project/fake_helu.rb', line 3 def restore @restore end |
#storage ⇒ Object
Returns the value of attribute storage.
3 4 5 |
# File 'lib/project/fake_helu.rb', line 3 def storage @storage end |
#winning ⇒ Object
Returns the value of attribute winning.
3 4 5 |
# File 'lib/project/fake_helu.rb', line 3 def winning @winning end |
Instance Method Details
#bought? ⇒ Boolean
9 10 11 12 |
# File 'lib/project/fake_helu.rb', line 9 def bought? #TODO. Be able to switch this false end |
#buy ⇒ Object
18 19 20 |
# File 'lib/project/fake_helu.rb', line 18 def buy winning.call(fake_transaction) end |
#close ⇒ Object
14 15 16 |
# File 'lib/project/fake_helu.rb', line 14 def close # just implementing Helu's interface end |
#fake_fail ⇒ Object
22 23 24 |
# File 'lib/project/fake_helu.rb', line 22 def fake_fail # TODO: We need to implement a way to fake a fail end |