Class: OneApi::ObjectFieldConverter

Inherits:
FieldConversionRule show all
Defined in:
lib/oneapi-ruby/objects.rb

Instance Attribute Summary

Attributes inherited from FieldConversionRule

#json_field_name, #object_field_name

Instance Method Summary collapse

Constructor Details

#initialize(classs, json_field_name = nil) ⇒ ObjectFieldConverter

Returns a new instance of ObjectFieldConverter.



33
34
35
36
# File 'lib/oneapi-ruby/objects.rb', line 33

def initialize(classs, json_field_name=nil)
    super(json_field_name)
    @classs = classs
end

Instance Method Details

#from_json(value) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/oneapi-ruby/objects.rb', line 38

def from_json(value)
    if value == nil
        return nil
    end

    return Conversions.from_json(@classs, value, is_error=nil)
end

#to_json(value) ⇒ Object



46
47
48
# File 'lib/oneapi-ruby/objects.rb', line 46

def to_json(value)
    # TODO
end