Sha256: 3a716ef83c0ecea5e4dada7be016c3393959b2c8aaf075ca00200c4a32a17c90

Contents?: true

Size: 235 Bytes

Versions: 1

Compression:

Stored size: 235 Bytes

Contents

class Integer
  def self.from_xommelier(value)
    return nil if value.blank?
    begin
      value =~ /\./ ? Float(value) : Integer(value)
    rescue ArgumentError => e
      value
    end
  end

  def to_xommelier
    self
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xommelier-0.0.1 lib/xommelier/core_ext/integer.rb