lib/serializer/value_fetcher.rb
# Fetches a value from an attribute by checking if there's a ..
# .. static value set, or a ..
# .. method defined in the serializer, or a ..
# .. method/attribute defined in the object or ..
# .. it raises an error
Fetches a value from an attribute by checking if there's a
static value set, or a
method defined in the serializer, or a
method/attribute defined in the object or
it raises an error
Fetches a value from an attribute by checking if there ' s a static value set or a method defined in the serializer or a method / attribute defined in the object or it raises an error
def value
        @value ||= begin
          extracted_value = @values.detect(&:precondition?)
          if extracted_value.nil?
            raise SerializerError,
                  "unknown attribute '#{@values[0].extraction_key}'"
          end
          extracted_value.value
        end
      end
def value @value ||= begin extracted_value = @values . detect ( & :precondition? ) if extracted_value . nil? raise SerializerError , "unknown attribute '#{@values[0].extraction_key}'" end extracted_value . value end end
Fetches a value from an attribute by checking if there's a ..
.. static value set, or a ..
.. method defined in the serializer, or a ..
.. method/attribute defined in the object or ..
.. it raises an error
Fetches a value from an attribute by checking if there ' s a .. .. static value set or a .. .. method defined in the serializer or a .. .. method / attribute defined in the object or .. .. it raises an error