diff options
author | ytti <saku@ytti.fi> | 2016-01-04 18:50:54 +0200 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2016-01-04 18:50:54 +0200 |
commit | 0eeba91b426c8b4a6335a88da9c65ba38e5fac15 (patch) | |
tree | 02ba46c4f7d43b5721f3eb7de38599e0e019e5cf /lib/oxidized/model/model.rb | |
parent | f112dfa0c604ae1c990f6411a002806924c00bf3 (diff) | |
parent | e41f7b429901eb38ad785ad1fc2527dd41f35959 (diff) |
Merge pull request #250 from Shopify/master0.10.0
refactoring, test coverage and github hook
Diffstat (limited to 'lib/oxidized/model/model.rb')
-rw-r--r-- | lib/oxidized/model/model.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/model/model.rb b/lib/oxidized/model/model.rb index e0e3941..ca851e3 100644 --- a/lib/oxidized/model/model.rb +++ b/lib/oxidized/model/model.rb @@ -11,7 +11,8 @@ module Oxidized klass.instance_variable_set '@cfg', Hash.new { |h,k| h[k] = [] } klass.instance_variable_set '@procs', Hash.new { |h,k| h[k] = [] } klass.instance_variable_set '@expect', [] - klass.const_set :CFG, CFG + klass.instance_variable_set '@comment', nil + klass.instance_variable_set '@prompt', nil end def comment _comment='# ' return @comment if @comment @@ -78,7 +79,7 @@ module Oxidized attr_accessor :input, :node def cmd string, &block - out = @input.cmd string + out = "====================== #{string} ======================\n" + @input.cmd(string) return false unless out self.class.cmds[:all].each do |all_block| out = instance_exec Oxidized::String.new(out), string, &all_block |