Class: HTMLNotes::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/html_notes/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line) ⇒ Parser

Returns a new instance of Parser.



6
7
8
# File 'lib/html_notes/parser.rb', line 6

def initialize(line)
  @file, @line, @notation, @text = line.split(':')
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



4
5
6
# File 'lib/html_notes/parser.rb', line 4

def file
  @file
end

#lineObject (readonly)

Returns the value of attribute line.



4
5
6
# File 'lib/html_notes/parser.rb', line 4

def line
  @line
end

#notationObject (readonly)

Returns the value of attribute notation.



4
5
6
# File 'lib/html_notes/parser.rb', line 4

def notation
  @notation
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/html_notes/parser.rb', line 4

def text
  @text
end