Class: Consumer::PositionStore::Substitute::PositionStore
- Inherits:
-
Object
- Object
- Consumer::PositionStore::Substitute::PositionStore
- Includes:
- Consumer::PositionStore
- Defined in:
- lib/consumer/position_store/substitute.rb
Instance Attribute Summary collapse
-
#get_position ⇒ Object
Returns the value of attribute get_position.
-
#put_position ⇒ Object
Returns the value of attribute put_position.
Instance Method Summary collapse
Methods included from Consumer::PositionStore
Instance Attribute Details
#get_position ⇒ Object
Returns the value of attribute get_position.
11 12 13 |
# File 'lib/consumer/position_store/substitute.rb', line 11 def get_position @get_position end |
#put_position ⇒ Object
Returns the value of attribute put_position.
12 13 14 |
# File 'lib/consumer/position_store/substitute.rb', line 12 def put_position @put_position end |
Instance Method Details
#get ⇒ Object
14 15 16 |
# File 'lib/consumer/position_store/substitute.rb', line 14 def get get_position end |
#put(position) ⇒ Object
18 19 20 |
# File 'lib/consumer/position_store/substitute.rb', line 18 def put(position) self.put_position = position end |
#put?(expected_position = nil) ⇒ Boolean
22 23 24 25 26 27 28 |
# File 'lib/consumer/position_store/substitute.rb', line 22 def put?(expected_position=nil) if expected_position.nil? put_position ? true : false else put_position == expected_position end end |