Class: Serverkit::Resources::Line
- Defined in:
- lib/serverkit/resources/line.rb
Overview
Ensure a particular line is in a file, or replace an existing line using regexp.
Constant Summary collapse
- DEFAULT_STATE =
"present"
Instance Attribute Summary
Attributes inherited from Base
#attributes, #backend, #check_result, #recheck_result, #recipe
Instance Method Summary collapse
Methods inherited from Base
abstract_class?, #all_errors, attribute, #handlers, #id, #initialize, #notifiable?, #run_apply, #run_check, #successful?, #successful_on_check?, #successful_on_recheck?, #to_a
Constructor Details
This class inherits a constructor from Serverkit::Resources::Base
Instance Method Details
#apply ⇒ Object
Note:
Override
18 19 20 21 22 |
# File 'lib/serverkit/resources/line.rb', line 18 def apply if has_correct_file? send_applied_remote_file_content_to_path end end |
#check ⇒ Object
Note:
Override
25 26 27 |
# File 'lib/serverkit/resources/line.rb', line 25 def check has_correct_file? && has_correct_line? end |