Class: Const
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Base
Instance Method Summary collapse
- #arduino_code ⇒ Object
-
#initialize(params) ⇒ Const
constructor
A new instance of Const.
- #top_level_scope_code ⇒ Object
Methods inherited from Base
#add_arduino_code, #add_cycle_level_scope, #add_top_level_scope, #append_tsortable, #buildit, #cycle_level_arduino_code, #depends_on, #param_keys, #resolve_frame_optimized, #top_level_scope_arduino_code
Constructor Details
#initialize(params) ⇒ Const
Returns a new instance of Const.
5 6 7 8 |
# File 'lib/functions/const.rb', line 5 def initialize(params) super @value = params[:value] end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/functions/const.rb', line 3 def value @value end |
Instance Method Details
#arduino_code ⇒ Object
10 11 12 |
# File 'lib/functions/const.rb', line 10 def arduino_code [] end |
#top_level_scope_code ⇒ Object
14 15 16 17 18 |
# File 'lib/functions/const.rb', line 14 def top_level_scope_code [ "long #{@name}[3] = {#{@value.join(',')}};" ] end |