Class: TextExtractor::State
- Inherits:
-
Struct
- Object
- Struct
- TextExtractor::State
- Defined in:
- lib/text_extractor/directives.rb
Overview
class Expander
Instance Attribute Summary collapse
-
#current ⇒ Object
Returns the value of attribute current.
-
#current_line ⇒ Object
Returns the value of attribute current_line.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize ⇒ State
constructor
A new instance of State.
- #last_group ⇒ Object
- #newline? ⇒ Boolean
Constructor Details
#initialize ⇒ State
Returns a new instance of State.
126 127 128 129 130 |
# File 'lib/text_extractor/directives.rb', line 126 def initialize(*) super self.groups ||= [] self.target ||= [] end |
Instance Attribute Details
#current ⇒ Object
Returns the value of attribute current
125 126 127 |
# File 'lib/text_extractor/directives.rb', line 125 def current @current end |
#current_line ⇒ Object
Returns the value of attribute current_line
125 126 127 |
# File 'lib/text_extractor/directives.rb', line 125 def current_line @current_line end |
#groups ⇒ Object
Returns the value of attribute groups
125 126 127 |
# File 'lib/text_extractor/directives.rb', line 125 def groups @groups end |
#target ⇒ Object
Returns the value of attribute target
125 126 127 |
# File 'lib/text_extractor/directives.rb', line 125 def target @target end |
Instance Method Details
#last_group ⇒ Object
132 133 134 |
# File 'lib/text_extractor/directives.rb', line 132 def last_group groups.last end |
#newline? ⇒ Boolean
136 137 138 |
# File 'lib/text_extractor/directives.rb', line 136 def newline? current_line.end_with?("\n") end |