Class: Consumer::PositionStore::Substitute::PositionStore
- Inherits:
-
Object
- Object
- Consumer::PositionStore::Substitute::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
Instance Attribute Details
#get_position ⇒ Object
Returns the value of attribute get_position.
9 10 11 |
# File 'lib/consumer/position_store/substitute.rb', line 9 def get_position @get_position end |
#put_position ⇒ Object
Returns the value of attribute put_position.
10 11 12 |
# File 'lib/consumer/position_store/substitute.rb', line 10 def put_position @put_position end |
Instance Method Details
#get ⇒ Object
12 13 14 |
# File 'lib/consumer/position_store/substitute.rb', line 12 def get get_position end |
#put(position) ⇒ Object
16 17 18 |
# File 'lib/consumer/position_store/substitute.rb', line 16 def put(position) self.put_position = position end |
#put?(expected_position = nil) ⇒ Boolean
20 21 22 23 24 25 26 |
# File 'lib/consumer/position_store/substitute.rb', line 20 def put?(expected_position=nil) if expected_position.nil? put_position ? true : false else put_position == expected_position end end |