Class: Kettle::Jem::WriteIntent
- Inherits:
-
Object
- Object
- Kettle::Jem::WriteIntent
- Defined in:
- lib/kettle/jem.rb
Instance Attribute Summary collapse
-
#absolute_path ⇒ Object
readonly
Returns the value of attribute absolute_path.
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#recipe_name ⇒ Object
readonly
Returns the value of attribute recipe_name.
-
#relative_path ⇒ Object
readonly
Returns the value of attribute relative_path.
Instance Method Summary collapse
- #delete? ⇒ Boolean
-
#initialize(relative_path:, absolute_path:, action:, content: nil, recipe_name: nil, metadata: {}) ⇒ WriteIntent
constructor
A new instance of WriteIntent.
- #write? ⇒ Boolean
Constructor Details
#initialize(relative_path:, absolute_path:, action:, content: nil, recipe_name: nil, metadata: {}) ⇒ WriteIntent
Returns a new instance of WriteIntent.
1784 1785 1786 1787 1788 1789 1790 1791 |
# File 'lib/kettle/jem.rb', line 1784 def initialize(relative_path:, absolute_path:, action:, content: nil, recipe_name: nil, metadata: {}) @relative_path = relative_path.to_s @absolute_path = absolute_path.to_s @action = action.to_sym @content = content @recipe_name = recipe_name @metadata = || {} end |
Instance Attribute Details
#absolute_path ⇒ Object (readonly)
Returns the value of attribute absolute_path.
1782 1783 1784 |
# File 'lib/kettle/jem.rb', line 1782 def absolute_path @absolute_path end |
#action ⇒ Object (readonly)
Returns the value of attribute action.
1782 1783 1784 |
# File 'lib/kettle/jem.rb', line 1782 def action @action end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
1782 1783 1784 |
# File 'lib/kettle/jem.rb', line 1782 def content @content end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
1782 1783 1784 |
# File 'lib/kettle/jem.rb', line 1782 def @metadata end |
#recipe_name ⇒ Object (readonly)
Returns the value of attribute recipe_name.
1782 1783 1784 |
# File 'lib/kettle/jem.rb', line 1782 def recipe_name @recipe_name end |
#relative_path ⇒ Object (readonly)
Returns the value of attribute relative_path.
1782 1783 1784 |
# File 'lib/kettle/jem.rb', line 1782 def relative_path @relative_path end |
Instance Method Details
#delete? ⇒ Boolean
1793 1794 1795 |
# File 'lib/kettle/jem.rb', line 1793 def delete? action == :delete end |
#write? ⇒ Boolean
1797 1798 1799 |
# File 'lib/kettle/jem.rb', line 1797 def write? action == :write end |