Class: Dude::ProjectManagement::Client
- Inherits:
-
Object
- Object
- Dude::ProjectManagement::Client
- Defined in:
- lib/dude/project_management/client.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #method_missing(method, *args, &block) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
- #setup_client(tool) ⇒ Object
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 |
# File 'lib/dude/project_management/client.rb', line 11 def initialize tool = Dude::SETTINGS[:project_management_tool] return unless LIST_OF_AVAILABLE_PROJECT_MANAGEMENT_TOOLS.include? tool @client = setup_client(tool) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
22 23 24 |
# File 'lib/dude/project_management/client.rb', line 22 def method_missing(method, *args, &block) client.send(method, *args, &block) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
9 10 11 |
# File 'lib/dude/project_management/client.rb', line 9 def client @client end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
18 19 20 |
# File 'lib/dude/project_management/client.rb', line 18 def respond_to_missing?(method_name, include_private = false) client.respond_to_missing?(method_name, include_private) end |
#setup_client(tool) ⇒ Object
26 27 28 |
# File 'lib/dude/project_management/client.rb', line 26 def setup_client(tool) Object.const_get("Dude::ProjectManagement::#{tool.capitalize}::Client").new end |