Class: WP::API::Client
- Inherits:
-
Object
- Object
- WP::API::Client
- Includes:
- HTTParty, Endpoints
- Defined in:
- lib/wp/api/client.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
Instance Method Summary collapse
-
#initialize(host:, scheme: 'http') ⇒ Client
constructor
A new instance of Client.
Methods included from Endpoints
Constructor Details
#initialize(host:, scheme: 'http') ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 |
# File 'lib/wp/api/client.rb', line 13 def initialize(host:, scheme: 'http') @scheme = scheme @host = host fail ':host is required' unless host.is_a?(String) && host.length > 0 end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
11 12 13 |
# File 'lib/wp/api/client.rb', line 11 def host @host end |