Class: PogoPlug::Service

Inherits:
Object
  • Object
show all
Includes:
HashInitializer
Defined in:
lib/pogoplug/service.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from HashInitializer

#initialize

Instance Attribute Details

#api_urlObject

Returns the value of attribute api_url.



5
6
7
# File 'lib/pogoplug/service.rb', line 5

def api_url
  @api_url
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/pogoplug/service.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/pogoplug/service.rb', line 5

def name
  @name
end

Class Method Details

.from_json(json) ⇒ Object



7
8
9
# File 'lib/pogoplug/service.rb', line 7

def self.from_json(json)
  Service.new(name: json['name'], id: json['serviceid'], api_url: json['apiurl'])
end