Class: Faith::Context
- Inherits:
-
Object
- Object
- Faith::Context
- Defined in:
- lib/faith/context.rb
Instance Attribute Summary collapse
-
#mixin_instances ⇒ Object
Returns the value of attribute mixin_instances.
-
#output ⇒ Object
Returns the value of attribute output.
-
#tasks_executed ⇒ Object
Returns the value of attribute tasks_executed.
Instance Method Summary collapse
-
#initialize ⇒ Context
constructor
A new instance of Context.
- #mixins ⇒ Object
- #ran?(task) ⇒ Boolean
Constructor Details
Instance Attribute Details
#mixin_instances ⇒ Object
Returns the value of attribute mixin_instances.
9 10 11 |
# File 'lib/faith/context.rb', line 9 def mixin_instances @mixin_instances end |
#output ⇒ Object
Returns the value of attribute output.
9 10 11 |
# File 'lib/faith/context.rb', line 9 def output @output end |
#tasks_executed ⇒ Object
Returns the value of attribute tasks_executed.
9 10 11 |
# File 'lib/faith/context.rb', line 9 def tasks_executed @tasks_executed end |
Instance Method Details
#mixins ⇒ Object
15 16 17 |
# File 'lib/faith/context.rb', line 15 def mixins mixin_instances.to_h { |x| [x.mixin.name, x] } end |
#ran?(task) ⇒ Boolean
11 12 13 |
# File 'lib/faith/context.rb', line 11 def ran?(task) tasks_executed.include?(task) end |