Class: Particle::Platform

Inherits:
Model
  • Object
show all
Defined in:
lib/particle/platform.rb

Overview

Domain model for one Particle Platform from the /v1/build_targets endpoint

Instance Method Summary collapse

Methods inherited from Model

attribute_reader, #attributes, #get_attributes, #id, #inspect

Constructor Details

#initialize(client, attributes) ⇒ Platform

Returns a new instance of Platform.



5
6
7
# File 'lib/particle/platform.rb', line 5

def initialize(client, attributes)
  super(client, attributes)
end

Instance Method Details

#nameObject

This avoids upstream magic from making .name a Symbol–keep it a string yo



11
12
13
# File 'lib/particle/platform.rb', line 11

def name
  @attributes[:name].to_s
end