Class: Margin::Parser::Line
- Inherits:
-
Object
- Object
- Margin::Parser::Line
- Includes:
- LineMethods
- Defined in:
- lib/margin/parser.rb
Instance Attribute Summary collapse
-
#annotations ⇒ Object
readonly
Returns the value of attribute annotations.
-
#done ⇒ Object
readonly
Returns the value of attribute done.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(raw_data) ⇒ Line
constructor
A new instance of Line.
Methods included from LineMethods
detect_annotation_only, detect_offset, detect_task, extract_annotation_value, extract_annotations, strip_line, structure_annotation
Constructor Details
#initialize(raw_data) ⇒ Line
Returns a new instance of Line.
109 110 111 112 113 114 |
# File 'lib/margin/parser.rb', line 109 def initialize(raw_data) @raw_data = raw_data @offset = detect_offset(raw_data) @annotations = { notes: [], indexes: {} } parse! end |
Instance Attribute Details
#annotations ⇒ Object (readonly)
Returns the value of attribute annotations.
102 103 104 |
# File 'lib/margin/parser.rb', line 102 def annotations @annotations end |
#done ⇒ Object (readonly)
Returns the value of attribute done.
102 103 104 |
# File 'lib/margin/parser.rb', line 102 def done @done end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
102 103 104 |
# File 'lib/margin/parser.rb', line 102 def offset @offset end |
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
102 103 104 |
# File 'lib/margin/parser.rb', line 102 def raw_data @raw_data end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
102 103 104 |
# File 'lib/margin/parser.rb', line 102 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
102 103 104 |
# File 'lib/margin/parser.rb', line 102 def value @value end |