Class: Feedigest::Config
- Inherits:
-
Object
- Object
- Feedigest::Config
- Defined in:
- lib/feedigest/config.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #fetch(key) ⇒ Object
-
#initialize(path) ⇒ Config
constructor
A new instance of Config.
-
#mail_gem_smtp_options ⇒ Object
Translate SMTP options of feedigest for Mail gem.
- #options ⇒ Object
Constructor Details
#initialize(path) ⇒ Config
Returns a new instance of Config.
6 7 8 |
# File 'lib/feedigest/config.rb', line 6 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/feedigest/config.rb', line 4 def path @path end |
Instance Method Details
#fetch(key) ⇒ Object
10 11 12 |
# File 'lib/feedigest/config.rb', line 10 def fetch(key) .fetch(key) # Delegate end |
#mail_gem_smtp_options ⇒ Object
Translate SMTP options of feedigest for Mail gem
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/feedigest/config.rb', line 24 def { address: .fetch(:smtp_address), port: .fetch(:smtp_port), user_name: .fetch(:smtp_username), password: .fetch(:smtp_password), authentication: .fetch(:smtp_auth), enable_starttls: .fetch(:smtp_starttls) } end |
#options ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/feedigest/config.rb', line 14 def return @options if @options @options = .merge() @options[:smtp_starttls] = @options[:smtp_starttls] == 'true' @options end |