Class: Superhosting::CompositeMapper::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/superhosting/composite_mapper/base.rb

Direct Known Subclasses

Container, Site

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(etc_mapper:, lib_mapper:, web_mapper:) ⇒ Base

Returns a new instance of Base.



6
7
8
9
10
# File 'lib/superhosting/composite_mapper/base.rb', line 6

def initialize(etc_mapper:, lib_mapper:, web_mapper:)
  self.etc = etc_mapper
  self.lib = lib_mapper
  self.web = web_mapper
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



12
13
14
# File 'lib/superhosting/composite_mapper/base.rb', line 12

def method_missing(m, *args, &block)
  self.etc.send(m, *args, &block)
end

Instance Attribute Details

#etcObject

Returns the value of attribute etc.



4
5
6
# File 'lib/superhosting/composite_mapper/base.rb', line 4

def etc
  @etc
end

#libObject

Returns the value of attribute lib.



4
5
6
# File 'lib/superhosting/composite_mapper/base.rb', line 4

def lib
  @lib
end

#webObject

Returns the value of attribute web.



4
5
6
# File 'lib/superhosting/composite_mapper/base.rb', line 4

def web
  @web
end