Module: Metropol
- Defined in:
- lib/metropol.rb,
lib/metropol/client.rb,
lib/metropol/default.rb,
lib/metropol/request.rb,
lib/metropol/version.rb,
lib/metropol/legal_id.rb,
lib/metropol/request/id_modifier.rb,
lib/metropol/request/report_reason.rb
Defined Under Namespace
Modules: Default, LegalId Classes: Client, Request
Constant Summary collapse
- VERSION =
'0.1.0'.freeze
Class Attribute Summary collapse
-
.api_version ⇒ Object
writeonly
Sets the attribute api_version.
-
.port ⇒ Object
writeonly
Sets the attribute port.
-
.private_key ⇒ Object
writeonly
Sets the attribute private_key.
-
.public_key ⇒ Object
writeonly
Sets the attribute public_key.
Class Method Summary collapse
- .client ⇒ Object
-
.configure {|_self| ... } ⇒ Object
Set configuration variables using a block.
- .method_missing(method_name, *args, &block) ⇒ Object
- .reset! ⇒ Object
Class Attribute Details
.api_version=(value) ⇒ Object (writeonly)
Sets the attribute api_version
8 9 10 |
# File 'lib/metropol.rb', line 8 def api_version=(value) @api_version = value end |
.port=(value) ⇒ Object (writeonly)
Sets the attribute port
8 9 10 |
# File 'lib/metropol.rb', line 8 def port=(value) @port = value end |
.private_key=(value) ⇒ Object (writeonly)
Sets the attribute private_key
8 9 10 |
# File 'lib/metropol.rb', line 8 def private_key=(value) @private_key = value end |
.public_key=(value) ⇒ Object (writeonly)
Sets the attribute public_key
8 9 10 |
# File 'lib/metropol.rb', line 8 def public_key=(value) @public_key = value end |
Class Method Details
.client ⇒ Object
10 11 12 13 14 15 |
# File 'lib/metropol.rb', line 10 def client @client ||= Metropol::Client.new(public_key: @public_key, private_key: @private_key, port: @port, api_version: @api_version) end |
.configure {|_self| ... } ⇒ Object
Set configuration variables using a block
18 19 20 |
# File 'lib/metropol.rb', line 18 def configure yield self end |
.method_missing(method_name, *args, &block) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/metropol.rb', line 22 def method_missing(method_name, *args, &block) if client.respond_to?(method_name) return client.send(method_name, *args, &block) end super end |
.reset! ⇒ Object
30 31 32 33 34 35 |
# File 'lib/metropol.rb', line 30 def reset! @public_key = nil @private_key = nil @port = nil @api_version = nil end |