Class: Todo

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

Direct Known Subclasses

PrettyTodo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, path, line) ⇒ Todo

Returns a new instance of Todo.



8
9
10
11
12
# File 'lib/todo.rb', line 8

def initialize text, path, line
  @text = text
  @path = path
  @line = line
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



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

def line
  @line
end

#pathObject (readonly)

Returns the value of attribute path.



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

def path
  @path
end

#textObject (readonly)

Returns the value of attribute text.



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

def text
  @text
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/todo.rb', line 14

def to_s
  "#{@text} at line #{@line} in #{@path}"
end