Class: Serializer::SerializedValue

Inherits:
Value
  • Object
show all
Defined in:
lib/serializer/value.rb

Instance Method Summary collapse

Methods inherited from Value

#extraction_key, #initialize

Constructor Details

This class inherits a constructor from Serializer::Value

Instance Method Details

#precondition?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/serializer/value.rb', line 32

def precondition?
  @scope.respond_to?(extraction_key)
end

#valueObject



36
37
38
# File 'lib/serializer/value.rb', line 36

def value
  @scope.public_send(extraction_key)
end