Class: HumanAttributes::Formatters::Numeric

Inherits:
Base
  • Object
show all
Includes:
ActionView::Helpers::NumberHelper
Defined in:
lib/human_attributes/formatters/numeric.rb

Constant Summary

Constants included from Config

Config::TYPES

Instance Attribute Summary

Attributes inherited from Base

#attribute, #default, #options, #suffix, #type

Instance Method Summary collapse

Methods inherited from Base

#initialize, #method_name

Methods included from Config

#category_by_type, #formatter_by_type, #known_type?, #raise_error, #suffix_by_type, #type_config

Constructor Details

This class inherits a constructor from HumanAttributes::Formatters::Base

Instance Method Details

#apply(_instance, value) ⇒ Object



6
7
8
# File 'lib/human_attributes/formatters/numeric.rb', line 6

def apply(_instance, value)
  send(formatter_by_type(type), value, options)
end