Class: Ey::Core::Client::Blueprint

Inherits:
Model
  • Object
show all
Extended by:
Associations
Defined in:
lib/ey-core/models/blueprint.rb

Instance Method Summary collapse

Methods included from Associations

assoc_accessor, assoc_coverage, assoc_reader, assoc_writer, associations, collection_reader

Methods inherited from Model

range_parser, #save, #to_s, #update!, #url

Instance Method Details

#destroyObject



27
28
29
# File 'lib/ey-core/models/blueprint.rb', line 27

def destroy
  self.connection.destroy_blueprint("id" => self.identity)
end

#save!Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ey-core/models/blueprint.rb', line 14

def save!
  requires :id

  params = {
    "id"        => self.id,
    "blueprint" => {
      "name" => self.name
    }
  }

  merge_attributes(self.connection.update_blueprint(params).body["blueprint"])
end