Class: NumberHumanizer::Manager
- Inherits:
-
Object
- Object
- NumberHumanizer::Manager
- Defined in:
- lib/number_humanizer.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(number, **args) ⇒ Manager
constructor
A new instance of Manager.
Constructor Details
#initialize(number, **args) ⇒ Manager
Returns a new instance of Manager.
25 26 27 28 29 |
# File 'lib/number_humanizer.rb', line 25 def initialize(number, **args) @number = number @language = args[:language] || NumberHumanizer.language @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
23 24 25 |
# File 'lib/number_humanizer.rb', line 23 def args @args end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
23 24 25 |
# File 'lib/number_humanizer.rb', line 23 def language @language end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
23 24 25 |
# File 'lib/number_humanizer.rb', line 23 def number @number end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
23 24 25 |
# File 'lib/number_humanizer.rb', line 23 def result @result end |
Instance Method Details
#call ⇒ Object
31 32 33 34 |
# File 'lib/number_humanizer.rb', line 31 def call @result = language_service_class.new(number, **args).call.result self end |