Class: Gluer::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/gluer/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options={})
  @base_path = options.fetch(:base_path, '.')
  @file_loader = options.fetch(:file_loader, Proc.new { |f| load(f) })
  @file_filter = options.fetch(:file_filter, default_file_filter)
  @magic_signature = options.fetch(:magic_signature, default_signature)
end

Instance Attribute Details

#base_pathObject

Returns the value of attribute base_path.



11
12
13
# File 'lib/gluer/configuration.rb', line 11

def base_path
  @base_path
end

#file_filterObject

Returns the value of attribute file_filter.



13
14
15
# File 'lib/gluer/configuration.rb', line 13

def file_filter
  @file_filter
end

#file_loaderObject

Returns the value of attribute file_loader.



12
13
14
# File 'lib/gluer/configuration.rb', line 12

def file_loader
  @file_loader
end

#magic_signatureObject

Returns the value of attribute magic_signature.



14
15
16
# File 'lib/gluer/configuration.rb', line 14

def magic_signature
  @magic_signature
end