Created
July 16, 2015 02:40
-
-
Save lucasrenan/6acfc8dfd735a4170bac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Device | |
CONSUMPTIONS = { | |
"1" => { method_id: 2, value: 20 }, | |
"2" => { method_id: 6, value: 0.001 }, | |
"3" => { method_id: 7, value: 30 } | |
} | |
end | |
puts Device::CONSUMPTIONS["2"][:method_id] # => 6 | |
puts Device::CONSUMPTIONS["2"][:value] # => 0.001 | |
puts Device::CONSUMPTIONS.inspect # => {"1"=>{:method_id=>2, :value=>20}, "2"=>{:method_id=>6, :value=>0.001}, "3"=>{:method_id=>7, :value=>30}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment