Sha256: 672975e81bdd53995f1a909d8a1db9634b9f4f576b7b3ba97d4c74cf0729f093

Contents?: true

Size: 253 Bytes

Versions: 28

Compression:

Stored size: 253 Bytes

Contents

# frozen_string_literal: true

NilClass.class_eval do
  # :nodoc:
  def usd_to_f
    nil
  end
end

Numeric.class_eval do
  # :nodoc:
  def usd_to_f
    to_f
  end
end

String.class_eval do
  # :nodoc:
  def usd_to_f
    gsub(/[$,]/, '').to_f
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
ruby-rails-extensions-2.0.0 lib/ruby-rails-extensions/extensions/usd_to_f.rb
ruby-rails-extensions-2.0.0.pre.rc.1 lib/ruby-rails-extensions/extensions/usd_to_f.rb
usd_to_f_extension-0.1.0 lib/usd_to_f_extension.rb
usd_to_f_extension-1.0.0 lib/usd_to_f_extension.rb
usd_to_f_extension-1.0.0.pre.rc.1 lib/usd_to_f_extension.rb
usd_to_f_extension-0.0.5 lib/usd_to_f_extension.rb
usd_to_f_extension-0.0.4 lib/usd_to_f_extension.rb
usd_to_f_extension-0.0.3 lib/usd_to_f_extension.rb