module Particle::Client::Platforms

Public Instance Methods

platform(attributes) click to toggle source
# 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() click to toggle source

List all available Particle Hardware platforms that you can use the cloud compiler with

@return [Array<Platform>] List of Particle Hardware platforms that have build targets you can compile sources with

# File lib/particle/client/platforms.rb, line 11
def platforms
  @platforms = []
  get(BuildTarget.path)[:platforms].each_pair do |platform_name, platform_id|
    @platforms << Platform.new(self, {name: platform_name, id: platform_id})
  end
  @platforms
end