Class: Maximum
Instance Attribute Summary collapse
-
#op1 ⇒ Object
Returns the value of attribute op1.
-
#op2 ⇒ Object
Returns the value of attribute op2.
Attributes inherited from Base
Instance Method Summary collapse
- #arduino_code ⇒ Object
- #cycle_level_arduino_code ⇒ Object
- #param_keys ⇒ Object
- #top_level_scope_code ⇒ Object
Methods inherited from Base
#add_arduino_code, #add_cycle_level_scope, #add_top_level_scope, #append_tsortable, #buildit, #depends_on, #initialize, #resolve_frame_optimized, #top_level_scope_arduino_code
Constructor Details
This class inherits a constructor from Base
Instance Attribute Details
#op1 ⇒ Object
Returns the value of attribute op1.
12 13 14 |
# File 'lib/functions/max.rb', line 12 def op1 @op1 end |
#op2 ⇒ Object
Returns the value of attribute op2.
13 14 15 |
# File 'lib/functions/max.rb', line 13 def op2 @op2 end |
Instance Method Details
#arduino_code ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/functions/max.rb', line 19 def arduino_code unless @frame_optimized [ "maximum(#{@op1.name}, #{@op2.name}, #{@name});" ] else [] end end |
#cycle_level_arduino_code ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/functions/max.rb', line 29 def cycle_level_arduino_code if @frame_optimized [ "maximum(#{@op1.name}, #{@op2.name}, #{@name});" ] else [] end end |
#param_keys ⇒ Object
15 16 17 |
# File 'lib/functions/max.rb', line 15 def param_keys [:op1, :op2] end |
#top_level_scope_code ⇒ Object
39 40 41 42 43 |
# File 'lib/functions/max.rb', line 39 def top_level_scope_code [ "long #{@name}[3];" ] end |