Class: Redminer::Base

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

Direct Known Subclasses

Issue

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, access_key, options = {}) ⇒ Base

Returns a new instance of Base.



5
6
7
# File 'lib/redminer/base.rb', line 5

def initialize(host, access_key, options = {})
  @server = Server.new(host, access_key, options)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



18
19
20
# File 'lib/redminer/base.rb', line 18

def method_missing(m, *args, &blk)
  @server.send(m, *args, &blk)
end

Instance Attribute Details

#serverObject

Returns the value of attribute server.



3
4
5
# File 'lib/redminer/base.rb', line 3

def server
  @server
end

Instance Method Details

#all=(hash) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/redminer/base.rb', line 9

def all=(hash)
  hash.each_pair { |k, v|
    if respond_to?("#{k}=")
      send("#{k}=", v)
    end
  }
  self
end