module SimpleNumbers::Format::InstanceMethods
Public Instance Methods
human_number(**options)
click to toggle source
Format
Number
# File lib/simple_numbers.rb, line 51 def human_number(**options) HELPER.number_to_human(self, options) end
inr(**options)
click to toggle source
# File lib/simple_numbers.rb, line 26 def inr(**options) options.delete(:unit) if options.key?(:unit) HELPER.number_to_currency(self, options.merge!(unit: 'Rs. ')) end
percentage(**options)
click to toggle source
Format
Percentage
# File lib/simple_numbers.rb, line 33 def percentage(**options) HELPER.number_to_percentage(self, options) end
phone(**options)
click to toggle source
Format
Phone Number
# File lib/simple_numbers.rb, line 39 def phone(**options) HELPER.number_to_phone(self, options) end
storage(**options)
click to toggle source
Format
Size
# File lib/simple_numbers.rb, line 45 def storage(**options) HELPER.number_to_human_size(self, options) end
usd(**options)
click to toggle source
Format
Money
# File lib/simple_numbers.rb, line 21 def usd(**options) options.delete(:unit) if options.key?(:unit) HELPER.number_to_currency(self, options) end