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