Sha256: a3980c49d9337259095ba0d19fd6161a1bbff86a5b5de3626b32219a72840f13

Contents?: true

Size: 389 Bytes

Versions: 1

Compression:

Stored size: 389 Bytes

Contents

module Virtus
  class Attribute
    class EmbeddedValue < Object

      # EmbeddedValue attribute handling Struct primitive
      #
      class FromStruct < EmbeddedValue

        # @api private
        def coerce(attributes)
          super or @primitive.new(*attributes)
        end

      end # class FromStruct
    end # class EmbeddedValue
  end # class Attribute
end # module Virtus

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
virtus-0.5.0 lib/virtus/attribute/embedded_value/from_struct.rb