Class: Meta::JsonSchema::ObjectWrapper
- Inherits:
-
Object
- Object
- Meta::JsonSchema::ObjectWrapper
show all
- Defined in:
- lib/meta/json_schema/support/type_converter.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ObjectWrapper.
8
9
10
|
# File 'lib/meta/json_schema/support/type_converter.rb', line 8
def initialize(target)
@target = target
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
24
25
26
|
# File 'lib/meta/json_schema/support/type_converter.rb', line 24
def method_missing(method, *args)
@target.__send__(method, *args)
end
|
Instance Method Details
#[](key) ⇒ Object
20
21
22
|
# File 'lib/meta/json_schema/support/type_converter.rb', line 20
def [](key)
@target.__send__(key)
end
|
#__target__ ⇒ Object
12
13
14
|
# File 'lib/meta/json_schema/support/type_converter.rb', line 12
def __target__
@target
end
|
#key?(key) ⇒ Boolean
16
17
18
|
# File 'lib/meta/json_schema/support/type_converter.rb', line 16
def key?(key)
@target.respond_to?(key)
end
|