Class: Mailrelay::API
Instance Method Summary collapse
- #api_url ⇒ Object
-
#initialize(hostname, api_key) ⇒ API
constructor
A new instance of API.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(hostname, api_key) ⇒ API
Returns a new instance of API.
8 9 10 11 |
# File 'lib/mailrelay/api.rb', line 8 def initialize hostname, api_key @hostname = hostname @api_key = api_key end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
17 18 19 |
# File 'lib/mailrelay/api.rb', line 17 def method_missing(method, *args) call(method.to_s, *args) end |
Instance Method Details
#api_url ⇒ Object
13 14 15 |
# File 'lib/mailrelay/api.rb', line 13 def api_url "http://#{@hostname}/ccm/admin/api/version/2/&type=json" end |