Module: Wordy
- Defined in:
- lib/wordy.rb,
lib/wordy/cli.rb,
lib/wordy/job.rb,
lib/wordy/account.rb
Defined Under Namespace
Classes: Account, Cli, Job, WordyException
Constant Summary collapse
- WORDY_URL =
URI.parse('https://wordy.com/api/1.0/')
- WORDY_STAGING_URL =
URI.parse('https://staging.wordy.com/api/1.0/')
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.env ⇒ Object
Returns the value of attribute env.
-
.username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
11 12 13 |
# File 'lib/wordy.rb', line 11 def api_key @api_key end |
.env ⇒ Object
Returns the value of attribute env.
11 12 13 |
# File 'lib/wordy.rb', line 11 def env @env end |
.username ⇒ Object
Returns the value of attribute username.
11 12 13 |
# File 'lib/wordy.rb', line 11 def username @username end |
Class Method Details
.configure {|_self| ... } ⇒ Object
In your initializer: Wordy.configure do |c|
c.api_key = ENV['WORDY_API_KEY']
c.username = ENV['WORDY_USERNAME']
end
19 20 21 22 |
# File 'lib/wordy.rb', line 19 def configure self.env = 'production' yield self end |
.wordy_url ⇒ Object
24 25 26 |
# File 'lib/wordy.rb', line 24 def wordy_url self.env == 'production' ? WORDY_URL : WORDY_STAGING_URL end |