Class: Cuenote::Api::Base

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

Direct Known Subclasses

Import, Node

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.connection(command) ⇒ Object



6
7
8
# File 'lib/cuenote/api/base.rb', line 6

def self.connection(command)
  Connection.new(command)
end

.run(command, params = {}) ⇒ Object



10
11
12
# File 'lib/cuenote/api/base.rb', line 10

def self.run(command, params={})
  connection(Command.new(command, params)).response
end

Instance Method Details

#connection(command) ⇒ Object



14
15
16
# File 'lib/cuenote/api/base.rb', line 14

def connection(command)
  self.class.connection command
end

#run(command, params = {}) ⇒ Object



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

def run(command, params={})
  self.class.run command, params
end