Class: FakeHelu

Inherits:
Object
  • Object
show all
Defined in:
lib/project/fake_helu.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#failObject

Returns the value of attribute fail.



3
4
5
# File 'lib/project/fake_helu.rb', line 3

def fail
  @fail
end

#product_idObject (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

#restoreObject

Returns the value of attribute restore.



3
4
5
# File 'lib/project/fake_helu.rb', line 3

def restore
  @restore
end

#storageObject

Returns the value of attribute storage.



3
4
5
# File 'lib/project/fake_helu.rb', line 3

def storage
  @storage
end

#winningObject

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

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/project/fake_helu.rb', line 9

def bought?
  #TODO. Be able to switch this
  false
end

#buyObject



18
19
20
# File 'lib/project/fake_helu.rb', line 18

def buy
  winning.call(fake_transaction)
end

#closeObject



14
15
16
# File 'lib/project/fake_helu.rb', line 14

def close
  # just implementing Helu's interface
end

#fake_failObject



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