Sha256: 7c9741e2579d2c3fc56930e191a5980472eb14b7062ac88e3e129d4c085e60c9

Contents?: true

Size: 223 Bytes

Versions: 1

Compression:

Stored size: 223 Bytes

Contents

module TypeCast
  extend ActiveSupport::Concern

  def to_integer(value)
    value.to_i if value.present?
  end

  def to_string(value)
    value.to_s
  end

  def to_float(value)
    value.to_f if value.present?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
json_parser-1.0.0 lib/concerns/type_cast.rb