Class: JCR::Root
- Inherits:
-
Object
- Object
- JCR::Root
- Defined in:
- lib/jcr/find_roots.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#failures ⇒ Object
Returns the value of attribute failures.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nameless ⇒ Object
Returns the value of attribute nameless.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#rule ⇒ Object
Returns the value of attribute rule.
-
#slice ⇒ Object
Returns the value of attribute slice.
Instance Method Summary collapse
-
#initialize(rule, name = nil, nameless = true, default = false) ⇒ Root
constructor
A new instance of Root.
Constructor Details
#initialize(rule, name = nil, nameless = true, default = false) ⇒ Root
Returns a new instance of Root.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/jcr/find_roots.rb', line 23 def initialize rule, name = nil, nameless = true, default = false @rule = rule @name = name @nameless = nameless if name @nameless = false end @default = default @slice = JCR::find_first_slice( rule ) @pos = @slice.line_and_column @offset = @slice.offset end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def default @default end |
#failures ⇒ Object
Returns the value of attribute failures.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def failures @failures end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def name @name end |
#nameless ⇒ Object
Returns the value of attribute nameless.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def nameless @nameless end |
#offset ⇒ Object
Returns the value of attribute offset.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def offset @offset end |
#pos ⇒ Object
Returns the value of attribute pos.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def pos @pos end |
#rule ⇒ Object
Returns the value of attribute rule.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def rule @rule end |
#slice ⇒ Object
Returns the value of attribute slice.
21 22 23 |
# File 'lib/jcr/find_roots.rb', line 21 def slice @slice end |