Class: Loaderio::Application

Inherits:
Base
  • Object
show all
Defined in:
lib/loaderio/application.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#errors, #message

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, create, find, #valid?

Constructor Details

#initialize(attributes) ⇒ Application

Returns a new instance of Application.



5
6
7
8
# File 'lib/loaderio/application.rb', line 5

def initialize(attributes)
  @app_id, @app, @status = attributes[:app_id], attributes[:app], attributes[:status]
  super
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



3
4
5
# File 'lib/loaderio/application.rb', line 3

def app
  @app
end

#app_idObject (readonly)

Returns the value of attribute app_id.



3
4
5
# File 'lib/loaderio/application.rb', line 3

def app_id
  @app_id
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/loaderio/application.rb', line 3

def status
  @status
end

Class Method Details

.resource_nameObject



10
11
12
# File 'lib/loaderio/application.rb', line 10

def self.resource_name
  "apps"
end

.verify(app_id) ⇒ Object



14
15
16
# File 'lib/loaderio/application.rb', line 14

def self.verify(app_id)
  new(parse(Loaderio::Configuration.resource["#{resource_name}/#{app_id}/verify"].post({})))
end

Instance Method Details

#verification_idObject



18
19
20
# File 'lib/loaderio/application.rb', line 18

def verification_id
  "loaderio-#{app_id}"
end