Class: Unfuddle::Configuration
- Inherits:
-
Object
- Object
- Unfuddle::Configuration
- Defined in:
- lib/unfuddle/configuration.rb
Defined Under Namespace
Classes: Logger
Instance Method Summary collapse
Instance Method Details
#from_options(options) ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/unfuddle/configuration.rb', line 37 def () = .with_indifferent_access self.subdomain = [:subdomain] if .key?(:subdomain) self.username = [:username] if .key?(:username) self.password = [:password] if .key?(:password) self.include_associations = [:include_associations] if .key?(:include_associations) self.include_closed_on = [:include_closed_on] if .key?(:include_closed_on) self.timeout = .fetch :timeout, 120 self.logger = .fetch :logger, Unfuddle::Configuration::Logger.new end |
#merge(options) ⇒ Object
23 24 25 |
# File 'lib/unfuddle/configuration.rb', line 23 def merge() to_h.merge() end |
#to_h ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/unfuddle/configuration.rb', line 27 def to_h { subdomain: subdomain, username: username, password: password, include_associations: include_associations, include_closed_on: include_closed_on, logged: logger, timeout: timeout } end |