Module: Laximo::Options

Extended by:
Options
Included in:
Options
Defined in:
lib/laximo/options.rb

Instance Method Summary collapse

Instance Method Details

#am_soap_action(str = nil) ⇒ Object

debug?



91
92
93
94
95
96
# File 'lib/laximo/options.rb', line 91

def am_soap_action(str = nil)

  return @am_soap_action if str.nil?
  @am_soap_action = str

end

#am_soap_endpoint(str = nil) ⇒ Object

am_soap_action



98
99
100
101
102
103
# File 'lib/laximo/options.rb', line 98

def am_soap_endpoint(str = nil)

  return @am_soap_endpoint if str.nil?
  @am_soap_endpoint = str

end

#debug(str = nil) ⇒ Object

user_agent



83
84
85
# File 'lib/laximo/options.rb', line 83

def debug(str = nil)
  @debug = (str === true)
end

#debug?Boolean

debug

Returns:

  • (Boolean)


87
88
89
# File 'lib/laximo/options.rb', line 87

def debug?
  @debug === true
end

#login(str = nil) ⇒ Object

use login



17
18
19
20
21
22
# File 'lib/laximo/options.rb', line 17

def (str = nil)

  return @login if str.nil?
  @login = str

end

#oem_soap_action(str = nil) ⇒ Object

am_soap_endpoint



105
106
107
108
109
110
# File 'lib/laximo/options.rb', line 105

def oem_soap_action(str = nil)

  return @oem_soap_action if str.nil?
  @oem_soap_action = str

end

#oem_soap_endpoint(str = nil) ⇒ Object

oem_soap_action



112
113
114
115
116
117
# File 'lib/laximo/options.rb', line 112

def oem_soap_endpoint(str = nil)

  return @oem_soap_endpoint if str.nil?
  @oem_soap_endpoint = str

end

#password(str = nil) ⇒ Object

login



24
25
26
27
28
29
# File 'lib/laximo/options.rb', line 24

def password(str = nil)

  return @password if str.nil?
  @password = str

end

#ssl_cert(str = nil) ⇒ Object

ssl_key

Raises:

  • (::LoadError)


42
43
44
45
46
47
48
49
50
51
# File 'lib/laximo/options.rb', line 42

def ssl_cert(str = nil)

  ::Laximo.deprecated!

  return @ssl_cert if str.nil?
  raise ::LoadError.new("File #{str} is not found") unless File.exists?(str)

  @ssl_cert = ::OpenSSL::X509::Certificate.new(::File.read(str))

end

#ssl_key(str = nil) ⇒ Object

password

Raises:

  • (::LoadError)


31
32
33
34
35
36
37
38
39
40
# File 'lib/laximo/options.rb', line 31

def ssl_key(str = nil)

  ::Laximo.deprecated!

  return @ssl_key if str.nil?
  raise ::LoadError.new("File #{str} is not found") unless File.exists?(str)

  @ssl_key = ::OpenSSL::PKey::RSA.new(::File.read(str))

end

#ssl_verify(str = nil) ⇒ Object

ssl_cert



53
54
55
56
57
58
59
60
# File 'lib/laximo/options.rb', line 53

def ssl_verify(str = nil)

  ::Laximo.deprecated!

  return @ssl_verify if str.nil?
  @ssl_verify = (str === true ? ::OpenSSL::SSL::VERIFY_PEER : ::OpenSSL::SSL::VERIFY_NONE)

end

#timeout(str = nil) ⇒ Object

use_ssl



69
70
71
72
73
74
# File 'lib/laximo/options.rb', line 69

def timeout(str = nil)

  return @timeout if str.nil?
  @timeout = String(str).to_i(10).abs

end

#use_login(str = nil) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/laximo/options.rb', line 8

def (str = nil)

  ::Laximo.deprecated!

  return ( === true) if str.nil?
   = str

end

#use_ssl(str = nil) ⇒ Object

ssl_verify



62
63
64
65
66
67
# File 'lib/laximo/options.rb', line 62

def use_ssl(str = nil)

  return (@use_ssl === true) if str.nil?
  @use_ssl = str

end

#user_agent(str = nil) ⇒ Object

timeout



76
77
78
79
80
81
# File 'lib/laximo/options.rb', line 76

def user_agent(str = nil)

  return @user_agent if str.nil?
  @user_agent = str

end