Class: JsonPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/json_printer.rb

Class Method Summary collapse

Class Method Details

.printer(celcius, fahrenheit, kelvin) ⇒ Object

Prints the three formats of temperature in a JSON string



4
5
6
# File 'lib/json_printer.rb', line 4

def self.printer(celcius, fahrenheit, kelvin)
  puts "{celcius: #{celcius}, fahrenheit: #{fahrenheit}, kelvin: #{kelvin}}"
end