Class: Adobe::Aem::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/adobe/aem/api.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Api

Returns a new instance of Api.



19
20
21
22
23
# File 'lib/adobe/aem/api.rb', line 19

def initialize(options = {})
  @context = Context.new
  @context.configuration = Configuration.new(options)
  @context.connector = Connector.new(@context)
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



9
10
11
# File 'lib/adobe/aem/api.rb', line 9

def context
  @context
end

Class Method Details

.proxy(name, klass) ⇒ Object



12
13
14
15
16
# File 'lib/adobe/aem/api.rb', line 12

def proxy(name, klass)
  define_method name do
    klass.new(@context)
  end
end