Class: JCR::ArrayBehavior
- Inherits:
-
Object
- Object
- JCR::ArrayBehavior
- Defined in:
- lib/jcr/evaluate_array_rules.rb
Instance Attribute Summary collapse
-
#checked_hash ⇒ Object
Returns the value of attribute checked_hash.
-
#extra_prohibited ⇒ Object
Returns the value of attribute extra_prohibited.
-
#last_index ⇒ Object
Returns the value of attribute last_index.
-
#ordered ⇒ Object
Returns the value of attribute ordered.
Instance Method Summary collapse
-
#initialize(current_behavior = nil) ⇒ ArrayBehavior
constructor
A new instance of ArrayBehavior.
Constructor Details
#initialize(current_behavior = nil) ⇒ ArrayBehavior
Returns a new instance of ArrayBehavior.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/jcr/evaluate_array_rules.rb', line 32 def initialize( current_behavior = nil ) if current_behavior @checked_hash = {} @checked_hash.merge!( current_behavior.checked_hash ) @last_index = current_behavior.last_index @ordered = current_behavior.ordered @extra_prohibited = false else @checked_hash = {} @last_index = 0 @ordered = true @extra_prohibited = true end end |
Instance Attribute Details
#checked_hash ⇒ Object
Returns the value of attribute checked_hash.
30 31 32 |
# File 'lib/jcr/evaluate_array_rules.rb', line 30 def checked_hash @checked_hash end |
#extra_prohibited ⇒ Object
Returns the value of attribute extra_prohibited.
30 31 32 |
# File 'lib/jcr/evaluate_array_rules.rb', line 30 def extra_prohibited @extra_prohibited end |
#last_index ⇒ Object
Returns the value of attribute last_index.
30 31 32 |
# File 'lib/jcr/evaluate_array_rules.rb', line 30 def last_index @last_index end |
#ordered ⇒ Object
Returns the value of attribute ordered.
30 31 32 |
# File 'lib/jcr/evaluate_array_rules.rb', line 30 def ordered @ordered end |