Class: Todoloo::Task
- Inherits:
-
Struct
- Object
- Struct
- Todoloo::Task
- Defined in:
- lib/todoloo/task.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#description ⇒ Object
Returns the value of attribute description.
-
#line ⇒ Object
Returns the value of attribute line.
-
#path ⇒ Object
Returns the value of attribute path.
-
#topics ⇒ Object
Returns the value of attribute topics.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
2 3 4 |
# File 'lib/todoloo/task.rb', line 2 def column @column end |
#description ⇒ Object
Returns the value of attribute description
2 3 4 |
# File 'lib/todoloo/task.rb', line 2 def description @description end |
#line ⇒ Object
Returns the value of attribute line
2 3 4 |
# File 'lib/todoloo/task.rb', line 2 def line @line end |
#path ⇒ Object
Returns the value of attribute path
2 3 4 |
# File 'lib/todoloo/task.rb', line 2 def path @path end |
#topics ⇒ Object
Returns the value of attribute topics
2 3 4 |
# File 'lib/todoloo/task.rb', line 2 def topics @topics end |
#type ⇒ Object
Returns the value of attribute type
2 3 4 |
# File 'lib/todoloo/task.rb', line 2 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/todoloo/task.rb', line 3 def self.from_hash(hash) new( hash.fetch(:type), hash.fetch(:topics), hash.fetch(:description), hash.fetch(:path), hash.fetch(:line), hash.fetch(:column) ) end |
Instance Method Details
#location ⇒ Object
14 15 16 |
# File 'lib/todoloo/task.rb', line 14 def location "#{path}:#{line}:#{column}" end |