# File lib/rad/arduino_sketch.rb, line 133 def vars(opts={}) opts.each do |k,v| if v.class == Symbol @declarations << "#{v} _#{k};" @accessors << "\#{v} \#{k}(){\n\\treturn _\#{k};\n}\n" else type = case v when Integer "int" when String "char*" when TrueClass "bool" when FalseClass "bool" end @declarations << "#{type} _#{k} = #{v};" @accessors << "\#{type} \#{k}(){\n\\treturn _\#{k};\n}\n" end end end