lib/apia/definitions/field.rb
# Return an instance of a Type or a Scalar for this field
#
# @param object [Object]
# @return [Object]
Return an instance of a Type or a Scalar for this field
Return an instance of a Type or a Scalar for this field
def value(object, request: nil, path: [])
        raw_value = raw_value_from_object(object)
        return nil if raw_value.nil? && null?
        raise Apia::NullFieldValueError.new(self, object) if raw_value.nil?
        if array? && raw_value.is_a?(Array)
          raw_value.map { |v| type.cast(v, request: request, path: path) }
        else
          type.cast(raw_value, request: request, path: path)
        end
      end
def value ( object , request : nil , path : [ ] ) raw_value = raw_value_from_object ( object ) return nil if raw_value . nil? && null? raise Apia :: NullFieldValueError . new ( self , object ) if raw_value . nil? if array? && raw_value . is_a? ( Array ) raw_value . map { | v | type . cast ( v , request : request , path : path ) } else type . cast ( raw_value , request : request , path : path ) end end
Return an instance of a Type or a Scalar for this field
Return an instance of a Type or a Scalar for this field
None
Object
object
<not_specific>
request
<not_specific>
path
<not_specific>
<not_specific>
None