class Virtus::Attribute::EmbeddedValue::FromStruct

Builds Struct-like instance with attributes passed to the constructor as a list of args rather than a hash

@private

Public Instance Methods

call(input) click to toggle source

@api public

# File lib/virtus/attribute/embedded_value.rb, line 16
def call(input)
  if input.kind_of?(primitive)
    input
  elsif not input.nil?
    primitive.new(*input)
  end
end