class PrintJson
Attributes
temperature[R]
Public Instance Methods
print()
click to toggle source
# File lib/print_json.rb, line 8 def print jtemperature = Temperature.new json_temperature = {:Celsius => jtemperature.celsius.to_s, :Fahrenheit => jtemperature.to_fahrenheit.to_s, :Kelvin => jtemperature.to_kelvin.to_s} puts JSON.pretty_generate(json_temperature) end