Class: Billy::Task
- Inherits:
-
Object
- Object
- Billy::Task
- Defined in:
- lib/billygoat/task.rb
Instance Attribute Summary collapse
-
#skill ⇒ Object
Returns the value of attribute skill.
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Task
constructor
A new instance of Task.
- #method ⇒ Object
- #name ⇒ Object
- #name=(value) ⇒ Object
- #source ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(config = {}) ⇒ Task
Returns a new instance of Task.
7 8 9 |
# File 'lib/billygoat/task.rb', line 7 def initialize(config = {}) config.each { |k,v| public_send("#{k}=",v) } end |
Instance Attribute Details
#skill ⇒ Object
Returns the value of attribute skill.
5 6 7 |
# File 'lib/billygoat/task.rb', line 5 def skill @skill end |
Instance Method Details
#method ⇒ Object
23 24 25 26 |
# File 'lib/billygoat/task.rb', line 23 def method require skill.internal_location if skill.internal_location skill.module.instance_method(name) end |
#name ⇒ Object
11 12 13 |
# File 'lib/billygoat/task.rb', line 11 def name @name end |
#name=(value) ⇒ Object
15 16 17 |
# File 'lib/billygoat/task.rb', line 15 def name=(value) @name = value.to_s.downcase end |
#source ⇒ Object
28 29 30 |
# File 'lib/billygoat/task.rb', line 28 def source self.method.source_location end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/billygoat/task.rb', line 19 def to_s name end |