Class: RCreds::Fetcher
- Inherits:
-
Object
- Object
- RCreds::Fetcher
- Defined in:
- lib/r_creds/fetcher.rb
Defined Under Namespace
Classes: NilValueError, NoRailsError
Instance Attribute Summary collapse
-
#allow_nil_value ⇒ Object
readonly
Returns the value of attribute allow_nil_value.
-
#cred_value ⇒ Object
readonly
Returns the value of attribute cred_value.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#environment_first ⇒ Object
readonly
Returns the value of attribute environment_first.
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(keys, default, environment, environment_first, allow_nil_value) ⇒ Fetcher
constructor
A new instance of Fetcher.
Constructor Details
#initialize(keys, default, environment, environment_first, allow_nil_value) ⇒ Fetcher
Returns a new instance of Fetcher.
8 9 10 11 12 13 14 |
# File 'lib/r_creds/fetcher.rb', line 8 def initialize(keys, default, environment, environment_first, allow_nil_value) @keys = keys.map!(&:to_sym) @default = default @environment = environment @environment_first = environment_first @allow_nil_value = allow_nil_value end |
Instance Attribute Details
#allow_nil_value ⇒ Object (readonly)
Returns the value of attribute allow_nil_value.
16 17 18 |
# File 'lib/r_creds/fetcher.rb', line 16 def allow_nil_value @allow_nil_value end |
#cred_value ⇒ Object (readonly)
Returns the value of attribute cred_value.
16 17 18 |
# File 'lib/r_creds/fetcher.rb', line 16 def cred_value @cred_value end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
16 17 18 |
# File 'lib/r_creds/fetcher.rb', line 16 def default @default end |
#environment_first ⇒ Object (readonly)
Returns the value of attribute environment_first.
16 17 18 |
# File 'lib/r_creds/fetcher.rb', line 16 def environment_first @environment_first end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
16 17 18 |
# File 'lib/r_creds/fetcher.rb', line 16 def keys @keys end |
Instance Method Details
#call ⇒ Object
18 19 20 21 |
# File 'lib/r_creds/fetcher.rb', line 18 def call check_rails fetch end |