class ExampleGem::Price
Public Class Methods
fen_to_yuan(fen)
click to toggle source
有误差
# File lib/example_gem/price.rb, line 6 def self.fen_to_yuan(fen) (fen / 100.000).round(2) end
yuan_to_fen(yuan)
click to toggle source
# File lib/example_gem/price.rb, line 10 def self.yuan_to_fen(yuan) (yuan * 100).round end