Class: Notes::Note

Inherits:
Struct
  • Object
show all
Defined in:
lib/notes.rb

Overview

The Note class. This is basically an object with accessors to four attributes:

  • tag: Tag the line is marked with;

  • text: The line of text containing the tag;

  • line: The line number;

  • file: The filename of the input source.

Instance Attribute Summary collapse

Instance Attribute Details

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



15
16
17
# File 'lib/notes.rb', line 15

def file
  @file
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



15
16
17
# File 'lib/notes.rb', line 15

def line
  @line
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



15
16
17
# File 'lib/notes.rb', line 15

def tag
  @tag
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



15
16
17
# File 'lib/notes.rb', line 15

def text
  @text
end