Module: Particle::Client::Platforms
- Included in:
- Particle::Client
- Defined in:
- lib/particle/client/platforms.rb
Instance Method Summary collapse
- #platform(attributes) ⇒ Object
-
#platforms ⇒ Array<Platform>
List all available Particle Hardware platforms that you can use the cloud compiler with.
Instance Method Details
#platform(attributes) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/particle/client/platforms.rb', line 19 def platform(attributes) if attributes.is_a? Platform attributes else Platform.new(self, attributes) end end |
#platforms ⇒ Array<Platform>
List all available Particle Hardware platforms that you can use the cloud compiler with
11 12 13 14 15 16 17 |
# File 'lib/particle/client/platforms.rb', line 11 def platforms @platforms = [] get(Particle::Client::BuildTargets::HTTP_PATH)[:platforms].each_pair do |platform_name, platform_id| @platforms << Platform.new(self, {name: platform_name, id: platform_id}) end @platforms end |