Class: Mini::Guard::XFileCommands
- Inherits:
-
Object
- Object
- Mini::Guard::XFileCommands
- Defined in:
- lib/mini/guard.rb
Instance Attribute Summary collapse
-
#xassociations ⇒ Object
readonly
Returns the value of attribute xassociations.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(xfiles) ⇒ XFileCommands
constructor
A new instance of XFileCommands.
Constructor Details
#initialize(xfiles) ⇒ XFileCommands
Returns a new instance of XFileCommands.
98 99 100 |
# File 'lib/mini/guard.rb', line 98 def initialize(xfiles) @xassociations = xfiles.inject([]) {|res, e| res += e.associations} end |
Instance Attribute Details
#xassociations ⇒ Object (readonly)
Returns the value of attribute xassociations.
96 97 98 |
# File 'lib/mini/guard.rb', line 96 def xassociations @xassociations end |
Instance Method Details
#execute ⇒ Object
102 103 104 105 106 107 |
# File 'lib/mini/guard.rb', line 102 def execute if execute? puts "executing: #{command}" puts Shellany::Sheller.stdout(command) end end |