Class: RedShift::Component::ContVarAttribute
- Defined in:
- lib/redshift/target/c/component-gen.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ ContVarAttribute
constructor
A new instance of ContVarAttribute.
Constructor Details
#initialize(*args) ⇒ ContVarAttribute
Returns a new instance of ContVarAttribute.
97 98 99 100 101 102 |
# File 'lib/redshift/target/c/component-gen.rb', line 97 def initialize(*args) super # value_0 is the relevant state outside of continuous update @dump = "rb_ary_push(result, rb_float_new(shadow->#{@cvar}.value_0))" @load = "shadow->#{@cvar}.value_0 = NUM2DBL(rb_ary_shift(from_array))" end |