Module: DeprecatedFractionalMethods
- Included in:
- Fractional
- Defined in:
- lib/deprecated.rb
Instance Method Summary collapse
- #fraction?(value) ⇒ Boolean
- #mixed_fraction?(value) ⇒ Boolean
- #single_fraction?(value) ⇒ Boolean
- #to_f(value) ⇒ Object
- #to_s(value, options = {}) ⇒ Object
Instance Method Details
#fraction?(value) ⇒ Boolean
13 14 15 16 |
# File 'lib/deprecated.rb', line 13 def fraction?(value) warn("Fractional.fraction? will be removed in v1.1\nUse Fractional.string_is_fraction? instead.") string_is_fraction?(value) end |
#mixed_fraction?(value) ⇒ Boolean
18 19 20 21 |
# File 'lib/deprecated.rb', line 18 def mixed_fraction?(value) warn("Fractional.mixed_fraction? will be removed in v1.1\nUse Fractional.string_is_mixed_fraction? instead.") string_is_mixed_fraction?(value) end |
#single_fraction?(value) ⇒ Boolean
23 24 25 26 |
# File 'lib/deprecated.rb', line 23 def single_fraction?(value) warn("Fractional.single_fraction? will be removed in v1.1\nUse Fractional.string_is_single_fraction? instead.") string_is_single_fraction?(value) end |
#to_f(value) ⇒ Object
3 4 5 6 |
# File 'lib/deprecated.rb', line 3 def to_f(value) warn("Fractional.to_f will be removed in v1.1.") string_to_fraction(value).to_f end |
#to_s(value, options = {}) ⇒ Object
8 9 10 11 |
# File 'lib/deprecated.rb', line 8 def to_s(value, ={}) warn("Fractional.to_s will be removed in v1.1\nUse Fractional.new(value).to_s instead.") new(float_to_fraction(value)).to_s() end |