class Craftar::App

Attributes

collection[R]
name[R]
resource_uri[R]
uuid[R]

Public Class Methods

craftar_name() click to toggle source
# File lib/craftar/app.rb, line 4
def self.craftar_name
  'app'
end
new(opts) click to toggle source
# File lib/craftar/app.rb, line 8
def initialize(opts)
  @name = opts[:name]
  @uuid = opts[:uuid]
  @collection = opts[:collection]
  @resource_uri = opts[:resource_uri]
end

Public Instance Methods

save() click to toggle source
# File lib/craftar/app.rb, line 15
def save
  response = json_call(:post, name: @name, collection: @collection)
  @uuid = response['uuid']
  @resource_uri = response['resource_uri']
  self
end
update(opts) click to toggle source
# File lib/craftar/app.rb, line 22
def update(opts)
  raise 'You cannot update an application id'
end