Class: RCicindela

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

Defined Under Namespace

Classes: APIError

Constant Summary collapse

VERSION =
'0.3.1'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, options = {}) ⇒ RCicindela

Returns a new instance of RCicindela.



16
17
18
19
20
21
22
23
24
# File 'lib/rcicindela.rb', line 16

def initialize(host, options = {})
  @host = host
  @port = options[:port] || 80
  @base_path = options[:base_path] || '/'
  @timeout = options[:timeout] || 1
  @default_params = options[:default_params] || {}

  @base_path.sub!(/\/+$/, '')
end

Instance Attribute Details

#base_pathObject (readonly)

Returns the value of attribute base_path.



14
15
16
# File 'lib/rcicindela.rb', line 14

def base_path
  @base_path
end

#default_paramsObject (readonly)

Returns the value of attribute default_params.



14
15
16
# File 'lib/rcicindela.rb', line 14

def default_params
  @default_params
end

#hostObject (readonly)

Returns the value of attribute host.



14
15
16
# File 'lib/rcicindela.rb', line 14

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



14
15
16
# File 'lib/rcicindela.rb', line 14

def port
  @port
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



14
15
16
# File 'lib/rcicindela.rb', line 14

def timeout
  @timeout
end