Class: Rasti::App::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/rasti/app/service.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(adapter) ⇒ Service

Returns a new instance of Service.



13
14
15
# File 'lib/rasti/app/service.rb', line 13

def initialize(adapter)
  @adapter = adapter
end

Class Method Details

.implements(*methods) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/rasti/app/service.rb', line 5

def self.implements(*methods)
  methods.each do |method|
    define_method method do |*args, &block|
      adapter.public_send method, *args, &block
    end
  end
end