Sha256: 12fea86f7ae4ae8c4dbb7ffaf604e71e75ea66546b083e3b63f890faf90ede68

Contents?: true

Size: 294 Bytes

Versions: 6

Compression:

Stored size: 294 Bytes

Contents

class AttributeType
  include Attributor::Type
  def self.native_type
    ::String
  end
end


class IntegerAttributeType
  include Attributor::Type
  def self.native_type
    ::Integer
  end

  def self.load(value,context=Attributor::DEFAULT_ROOT_CONTEXT, **options)
    value.to_i
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
attributor-2.6.0 spec/support/types.rb
attributor-2.5.0 spec/support/types.rb
attributor-2.4.0 spec/support/types.rb
attributor-2.3.0 spec/support/types.rb
attributor-2.2.1 spec/support/types.rb
attributor-2.2.0 spec/support/types.rb