Module: PatientZero::Configurable
- Included in:
- PatientZero
- Defined in:
- lib/patient_zero/configurable.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#email ⇒ Object
Returns the value of attribute email.
-
#password ⇒ Object
Returns the value of attribute password.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/patient_zero/configurable.rb', line 3 def api_key @api_key end |
#connection ⇒ Object
Returns the value of attribute connection.
3 4 5 |
# File 'lib/patient_zero/configurable.rb', line 3 def connection @connection end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/patient_zero/configurable.rb', line 3 def email @email end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/patient_zero/configurable.rb', line 3 def password @password end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/patient_zero/configurable.rb', line 3 def url @url end |
Class Method Details
.extended(base) ⇒ Object
5 6 7 |
# File 'lib/patient_zero/configurable.rb', line 5 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
9 10 11 12 |
# File 'lib/patient_zero/configurable.rb', line 9 def configure yield self self end |
#reset ⇒ Object
14 15 16 17 18 19 |
# File 'lib/patient_zero/configurable.rb', line 14 def reset self.url = 'https://app.viralheat.com' self.api_key = ENV['VIRAL_HEAT_API_KEY'] self.email = ENV['VIRAL_HEAT_EMAIL'] self.password = ENV['VIRAL_HEAT_PASSWORD'] end |