Class: Arxutils::TransactState
- Inherits:
-
Object
- Object
- Arxutils::TransactState
- Defined in:
- lib/arxutils/transactstate.rb
Instance Attribute Summary collapse
-
#ids ⇒ Object
Returns the value of attribute ids.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #add(xid) ⇒ Object
- #clear ⇒ Object
-
#initialize ⇒ TransactState
constructor
A new instance of TransactState.
- #need? ⇒ Boolean
Constructor Details
#initialize ⇒ TransactState
Returns a new instance of TransactState.
5 6 7 8 |
# File 'lib/arxutils/transactstate.rb', line 5 def initialize @ids = [] @state = :NONE end |
Instance Attribute Details
#ids ⇒ Object
Returns the value of attribute ids.
3 4 5 |
# File 'lib/arxutils/transactstate.rb', line 3 def ids @ids end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/arxutils/transactstate.rb', line 3 def state @state end |
Instance Method Details
#add(xid) ⇒ Object
10 11 12 |
# File 'lib/arxutils/transactstate.rb', line 10 def add( xid ) @ids << xid if @state == :TRACE end |
#clear ⇒ Object
14 15 16 |
# File 'lib/arxutils/transactstate.rb', line 14 def clear @ids = [] end |
#need? ⇒ Boolean
18 19 20 |
# File 'lib/arxutils/transactstate.rb', line 18 def need? @ids.size > 0 end |