Class: Twurl::AbstractCommandController

Inherits:
Object
  • Object
show all
Defined in:
lib/twurl/abstract_command_controller.rb

Overview

Subclasses need to implement a ‘dispatch’ instance method.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, options) ⇒ AbstractCommandController

Returns a new instance of AbstractCommandController.



11
12
13
14
# File 'lib/twurl/abstract_command_controller.rb', line 11

def initialize(client, options)
  @client  = client
  @options = options
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



4
5
6
# File 'lib/twurl/abstract_command_controller.rb', line 4

def client
  @client
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/twurl/abstract_command_controller.rb', line 4

def options
  @options
end

Class Method Details

.dispatch(*args, &block) ⇒ Object



6
7
8
# File 'lib/twurl/abstract_command_controller.rb', line 6

def dispatch(*args, &block)
  new(*args, &block).dispatch
end