Class: Jsapi::Meta::Model::Wrapper

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/jsapi/meta/model/wrapper.rb

Overview

Wraps a meta model

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#definitionsObject (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

#inspectObject

:nodoc:



20
21
22
# File 'lib/jsapi/meta/model/wrapper.rb', line 20

def inspect # :nodoc:
  "#<#{self.class.name} #{super}>"
end