Class: Serializer::StaticValue

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)


22
23
24
# File 'lib/serializer/value.rb', line 22

def precondition?
  @attribute.options.key?(:static_value)
end

#valueObject



26
27
28
# File 'lib/serializer/value.rb', line 26

def value
  @attribute.options.fetch(:static_value)
end