Class: Chef::Provider::ChefMirror::CopyListener
- Inherits:
-
Object
- Object
- Chef::Provider::ChefMirror::CopyListener
- Defined in:
- lib/chef/provider/chef_mirror.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#mirror ⇒ Object
readonly
Returns the value of attribute mirror.
Instance Method Summary collapse
- #error(str) ⇒ Object
-
#initialize(mirror) ⇒ CopyListener
constructor
A new instance of CopyListener.
-
#output(str) ⇒ Object
TODO output is not always indicative of a change.
- #warn(str) ⇒ Object
Constructor Details
#initialize(mirror) ⇒ CopyListener
Returns a new instance of CopyListener.
139 140 141 142 |
# File 'lib/chef/provider/chef_mirror.rb', line 139 def initialize(mirror) @mirror = mirror @errors = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
145 146 147 |
# File 'lib/chef/provider/chef_mirror.rb', line 145 def errors @errors end |
#mirror ⇒ Object (readonly)
Returns the value of attribute mirror.
144 145 146 |
# File 'lib/chef/provider/chef_mirror.rb', line 144 def mirror @mirror end |
Instance Method Details
#error(str) ⇒ Object
158 159 160 161 162 |
# File 'lib/chef/provider/chef_mirror.rb', line 158 def error(str) mirror.converge_by "ERROR: #{str}" do end @errors << str end |
#output(str) ⇒ Object
TODO output is not always indicative of a change. We may want to give ChefFS the ability to tell us that info. For now though, assuming any output means change is pretty damn close to the truth.
150 151 152 153 |
# File 'lib/chef/provider/chef_mirror.rb', line 150 def output(str) mirror.converge_by str do end end |
#warn(str) ⇒ Object
154 155 156 157 |
# File 'lib/chef/provider/chef_mirror.rb', line 154 def warn(str) mirror.converge_by "WARNING: #{str}" do end end |