Class: Gluer::Configuration
- Inherits:
-
Object
- Object
- Gluer::Configuration
- Defined in:
- lib/gluer/configuration.rb
Instance Attribute Summary collapse
-
#base_path ⇒ Object
Returns the value of attribute base_path.
-
#file_filter ⇒ Object
Returns the value of attribute file_filter.
-
#file_loader ⇒ Object
Returns the value of attribute file_loader.
-
#magic_signature ⇒ Object
Returns the value of attribute magic_signature.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 |
# File 'lib/gluer/configuration.rb', line 16 def initialize(={}) @base_path = .fetch(:base_path, '.') @file_loader = .fetch(:file_loader, Proc.new { |f| load(f) }) @file_filter = .fetch(:file_filter, default_file_filter) @magic_signature = .fetch(:magic_signature, default_signature) end |
Instance Attribute Details
#base_path ⇒ Object
Returns the value of attribute base_path.
11 12 13 |
# File 'lib/gluer/configuration.rb', line 11 def base_path @base_path end |
#file_filter ⇒ Object
Returns the value of attribute file_filter.
13 14 15 |
# File 'lib/gluer/configuration.rb', line 13 def file_filter @file_filter end |
#file_loader ⇒ Object
Returns the value of attribute file_loader.
12 13 14 |
# File 'lib/gluer/configuration.rb', line 12 def file_loader @file_loader end |
#magic_signature ⇒ Object
Returns the value of attribute magic_signature.
14 15 16 |
# File 'lib/gluer/configuration.rb', line 14 def magic_signature @magic_signature end |