module PKP::Physics
Public Class Methods
celsius_to_fahrenheit(celsius)
click to toggle source
# File lib/pkp_physics.rb, line 45 def self.celsius_to_fahrenheit celsius if @@c2f_hash.has_key? celsius @@c2f_hash[celsius] # Use Prior Knowledge else 1.8 * celsius + 32 # Retrieve from KBS / Compute end end
desc()
click to toggle source
# File lib/pkp_physics.rb, line 36 def self.desc # Just another desc method with a short name describe end
describe()
click to toggle source
.. describe .….….….….……
# File lib/pkp_physics.rb, line 32 def self.describe "Physics module; Uses 'Prior Knowledge' as needed." end
fahrenheit_to_celsius(fahrenheit)
click to toggle source
# File lib/pkp_physics.rb, line 58 def self.fahrenheit_to_celsius fahrenheit if @@f2c_hash.has_key? fahrenheit @@f2c_hash[fahrenheit] # Use Prior Knowledge else (fahrenheit - 32)/1.8 # Retrieve from KBS / Compute end end