Class: NumbersInWords::ToNumber
- Inherits:
-
Object
- Object
- NumbersInWords::ToNumber
- Extended by:
- Forwardable
- Includes:
- FractionParsing
- Defined in:
- lib/numbers_in_words/parsing/to_number.rb
Instance Attribute Summary collapse
-
#only_compress ⇒ Object
readonly
Returns the value of attribute only_compress.
-
#that ⇒ Object
readonly
Returns the value of attribute that.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(that, only_compress) ⇒ ToNumber
constructor
A new instance of ToNumber.
Methods included from FractionParsing
#fraction, #possible_fraction?, #strip_punctuation, #text, #text_including_punctuation
Constructor Details
#initialize(that, only_compress) ⇒ ToNumber
Returns a new instance of ToNumber.
14 15 16 17 |
# File 'lib/numbers_in_words/parsing/to_number.rb', line 14 def initialize(that, only_compress) @that = that @only_compress = only_compress end |
Instance Attribute Details
#only_compress ⇒ Object (readonly)
Returns the value of attribute only_compress.
12 13 14 |
# File 'lib/numbers_in_words/parsing/to_number.rb', line 12 def only_compress @only_compress end |
#that ⇒ Object (readonly)
Returns the value of attribute that.
12 13 14 |
# File 'lib/numbers_in_words/parsing/to_number.rb', line 12 def that @that end |
Instance Method Details
#call ⇒ Object
19 20 21 |
# File 'lib/numbers_in_words/parsing/to_number.rb', line 19 def call special || decimal || as_numbers end |