Class: PassNinja::Client
- Inherits:
-
Object
- Object
- PassNinja::Client
- Defined in:
- lib/passninja.rb
Instance Method Summary collapse
-
#initialize(account_id, api_key, host = 'https://api.passninja.com') ⇒ Client
constructor
A new instance of Client.
- #pass_templates ⇒ Object
- #passes ⇒ Object
Constructor Details
#initialize(account_id, api_key, host = 'https://api.passninja.com') ⇒ Client
Returns a new instance of Client.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/passninja.rb', line 6 def initialize(account_id, api_key, host = 'https://api.passninja.com') @account_id = account_id @api_key = api_key @host = host url = URI.parse(host) if url.instance_of? URI::HTTPS @use_ssl = true else @use_ssl = false end end |
Instance Method Details
#pass_templates ⇒ Object
18 19 20 |
# File 'lib/passninja.rb', line 18 def pass_templates PassTemplates.new(@account_id, @api_key, @host, @use_ssl) end |