Sha256: 8d3a3dfb81ab50658885d52785fddf7c11f3c7d5504f27e1464d8f99a950f0ac

Contents?: true

Size: 284 Bytes

Versions: 9

Compression:

Stored size: 284 Bytes

Contents

# frozen_string_literal: true

NilClass.class_eval do
  unless method_defined?(:usd_to_i)
    # :nodoc:
    def usd_to_i
      nil
    end
  end
end

String.class_eval do
  unless method_defined?(:usd_to_i)
    # :nodoc:
    def usd_to_i
      gsub(/[$,]/, '').to_i
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby-rails-extensions-1.1.1 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-1.1.1.pre.rc.1 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-0.2.0 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-0.2.0.pre.rc.1 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-1.1.0 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-1.1.0.pre.rc.1 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-0.1.0 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-1.0.0 lib/ruby-rails-extensions/extensions/usd_to_i.rb
ruby-rails-extensions-1.0.0.pre.rc.1 lib/ruby-rails-extensions/extensions/usd_to_i.rb