Class: Todo
- Inherits:
-
Object
- Object
- Todo
- Defined in:
- lib/todo.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, path, line) ⇒ Todo
constructor
A new instance of Todo.
- #to_s ⇒ Object
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
#line ⇒ Object (readonly)
Returns the value of attribute line.
6 7 8 |
# File 'lib/todo.rb', line 6 def line @line end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/todo.rb', line 6 def path @path end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
6 7 8 |
# File 'lib/todo.rb', line 6 def text @text end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/todo.rb', line 14 def to_s "#{@text} at line #{@line} in #{@path}" end |