Class: KickstartSnippet
- Inherits:
-
Object
- Object
- KickstartSnippet
- Defined in:
- lib/satops/operator.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #create(sat) ⇒ Object
- #delete(sat) ⇒ Object
-
#initialize(snippet) ⇒ KickstartSnippet
constructor
A new instance of KickstartSnippet.
- #update(sat) ⇒ Object
Constructor Details
#initialize(snippet) ⇒ KickstartSnippet
Returns a new instance of KickstartSnippet.
760 761 762 763 |
# File 'lib/satops/operator.rb', line 760 def initialize(snippet) @name=snippet['name'] @contents=snippet['contents'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
758 759 760 |
# File 'lib/satops/operator.rb', line 758 def name @name end |
Instance Method Details
#create(sat) ⇒ Object
769 770 771 |
# File 'lib/satops/operator.rb', line 769 def create(sat) sat.kickstartSnippet.createOrUpdate(@name, @contents) end |
#delete(sat) ⇒ Object
765 766 767 |
# File 'lib/satops/operator.rb', line 765 def delete(sat) sat.kickstartSnippet.delete(@name) end |
#update(sat) ⇒ Object
773 774 775 |
# File 'lib/satops/operator.rb', line 773 def update(sat) self.create(sat) end |