Class: Margin::Parser::Line

Inherits:
Object
  • Object
show all
Includes:
LineMethods
Defined in:
lib/margin/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#annotationsObject (readonly)

Returns the value of attribute annotations.



102
103
104
# File 'lib/margin/parser.rb', line 102

def annotations
  @annotations
end

#doneObject (readonly)

Returns the value of attribute done.



102
103
104
# File 'lib/margin/parser.rb', line 102

def done
  @done
end

#offsetObject (readonly)

Returns the value of attribute offset.



102
103
104
# File 'lib/margin/parser.rb', line 102

def offset
  @offset
end

#raw_dataObject (readonly)

Returns the value of attribute raw_data.



102
103
104
# File 'lib/margin/parser.rb', line 102

def raw_data
  @raw_data
end

#typeObject (readonly)

Returns the value of attribute type.



102
103
104
# File 'lib/margin/parser.rb', line 102

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



102
103
104
# File 'lib/margin/parser.rb', line 102

def value
  @value
end