Class: Jsapi::Meta::Model::Wrapper
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Jsapi::Meta::Model::Wrapper
- Defined in:
- lib/jsapi/meta/model/wrapper.rb
Overview
Wraps a meta model
Direct Known Subclasses
Parameter::Wrapper, RequestBody::Wrapper, Response::Wrapper, Schema::AdditionalProperties::Wrapper, Schema::Wrapper
Instance Attribute Summary collapse
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
Instance Method Summary collapse
-
#==(other) ⇒ Object
:nodoc:.
-
#initialize(model, definitions) ⇒ Wrapper
constructor
A new instance of Wrapper.
-
#inspect ⇒ Object
:nodoc:.
Constructor Details
#initialize(model, definitions) ⇒ Wrapper
Returns a new instance of Wrapper.
10 11 12 13 |
# File 'lib/jsapi/meta/model/wrapper.rb', line 10 def initialize(model, definitions) super(model.resolve(definitions)) @definitions = definitions end |
Instance Attribute Details
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
8 9 10 |
# File 'lib/jsapi/meta/model/wrapper.rb', line 8 def definitions @definitions end |
Instance Method Details
#==(other) ⇒ Object
:nodoc:
15 16 17 18 |
# File 'lib/jsapi/meta/model/wrapper.rb', line 15 def ==(other) # :nodoc: other.is_a?(self.class) && __getobj__ == other.__getobj__ end |
#inspect ⇒ Object
:nodoc:
20 21 22 |
# File 'lib/jsapi/meta/model/wrapper.rb', line 20 def inspect # :nodoc: "#<#{self.class.name} #{super}>" end |