class Helium::SensorPackage
Attributes
loaded[R]
Public Class Methods
new(opts = {})
click to toggle source
Calls superclass method
# File lib/helium/helium_script.rb, line 57 def initialize(opts = {}) super(opts) @loaded = @params.dig('meta', 'loaded') end
Public Instance Methods
package()
click to toggle source
Package
is immutable and can be cached
# File lib/helium/helium_script.rb, line 68 def package @package ||= Package.initialize_from_path(path: "#{resource_path}/package", client: @client) end
sensor()
click to toggle source
Sensor
is not immutable (name can change), and should not be cached
# File lib/helium/helium_script.rb, line 63 def sensor Sensor.initialize_from_path(path: "#{resource_path}/sensor", client: @client) end