Class: Oma::Ruby::Client

Inherits:
Object
  • Object
show all
Includes:
Actions, Errors
Defined in:
lib/oma-ruby/client.rb

Overview

Client class

Constant Summary

Constants included from Actions

Actions::API_ACTIONS

Constants included from Errors

Errors::API_ERRORS, Errors::HTTP_ERRORS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Errors

#api_error, #http_error

Constructor Details

#initialize(url:, user:, password:) ⇒ Client

Returns a new instance of Client.



15
16
17
18
19
# File 'lib/oma-ruby/client.rb', line 15

def initialize(url:, user:, password:)
  @url      = url
  @user     = user
  @password = password
end

Instance Attribute Details

#passwordObject (readonly)

Returns the value of attribute password.



10
11
12
# File 'lib/oma-ruby/client.rb', line 10

def password
  @password
end

#urlObject (readonly)

Returns the value of attribute url.



10
11
12
# File 'lib/oma-ruby/client.rb', line 10

def url
  @url
end

#userObject (readonly)

Returns the value of attribute user.



10
11
12
# File 'lib/oma-ruby/client.rb', line 10

def user
  @user
end