Class: KickstartSnippet

Inherits:
Object
  • Object
show all
Defined in:
lib/satops/operator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (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