module DeprecatedFractionalMethods

Public Instance Methods

fraction?(value) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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={}) click to toggle source
# File lib/deprecated.rb, line 8
def to_s(value, options={})
  warn("Fractional.to_s will be removed in v1.1\nUse Fractional.new(value).to_s instead.")
  new(float_to_fraction(value)).to_s(options)
end

Private Instance Methods

warn(message) click to toggle source
# File lib/deprecated.rb, line 29
def warn(message)
  $stderr.puts "\n*** Fractional deprecation warning: #{message}\n\n"
end