Module: BigML::Util::Config
- Included in:
- BigML
- Defined in:
- lib/big_ml/util/config.rb
Constant Summary collapse
- BIGML_ENDPOINT =
The endpoint that will be used to connect if none is set
"https://bigml.io/andromeda"- DEFAULT_BIGML_USERNAME =
The username if none is set
nil- DEFAULT_BIGML_API_KEY =
The api key if none is set
nil- VALID_OPTIONS_KEYS =
An array of valid keys in the options hash when configuring a Client
[:username, :api_key]
Instance Method Summary collapse
Instance Method Details
#configure {|_self| ... } ⇒ Object
15 16 17 18 |
# File 'lib/big_ml/util/config.rb', line 15 def configure yield self self end |
#options ⇒ Object
20 21 22 23 24 |
# File 'lib/big_ml/util/config.rb', line 20 def = {} VALID_OPTIONS_KEYS.each{ |k| [k] = send(k) } end |
#reset ⇒ Object
26 27 28 29 |
# File 'lib/big_ml/util/config.rb', line 26 def reset self.username = DEFAULT_BIGML_USERNAME self.api_key = DEFAULT_BIGML_API_KEY end |