Class: Mat::API::Config
- Inherits:
-
Object
- Object
- Mat::API::Config
- Defined in:
- lib/mat/api/config.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#http_client ⇒ Object
Returns the value of attribute http_client.
-
#json_parser ⇒ Object
Returns the value of attribute json_parser.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize {|_self| ... } ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 |
# File 'lib/mat/api/config.rb', line 10 def initialize @base_url = 'http://matapi.se/' @http_client = Mat::HTTP @json_parser = JSON yield self if block_given? end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
8 9 10 |
# File 'lib/mat/api/config.rb', line 8 def base_url @base_url end |
#http_client ⇒ Object
Returns the value of attribute http_client.
8 9 10 |
# File 'lib/mat/api/config.rb', line 8 def http_client @http_client end |
#json_parser ⇒ Object
Returns the value of attribute json_parser.
8 9 10 |
# File 'lib/mat/api/config.rb', line 8 def json_parser @json_parser end |