Class: GitReview::Server

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Helpers
Defined in:
lib/git-review/server.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServer

Returns a new instance of Server.



14
15
16
# File 'lib/git-review/server.rb', line 14

def initialize
  init_provider
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/git-review/server.rb', line 18

def method_missing(method, *args)
  if provider.respond_to?(method)
    provider.send(method, *args)
  else
    super
  end
end

Instance Attribute Details

#providerObject (readonly)

Returns the value of attribute provider.



8
9
10
# File 'lib/git-review/server.rb', line 8

def provider
  @provider
end

Class Method Details

.instanceObject



10
11
12
# File 'lib/git-review/server.rb', line 10

def self.instance
  @instance ||= new
end

Instance Method Details

#respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/git-review/server.rb', line 26

def respond_to?(method)
  provider.respond_to?(method) || super
end