Method: Tailor::Configuration::FileSet#initialize

Defined in:
lib/tailor/configuration/file_set.rb

#initialize(file_expression = nil, style = nil) ⇒ FileSet

Returns a new instance of FileSet.

Parameters:

  • style (Hash) (defaults to: nil)

    Style options to merge into the default Style settings.

  • file_expression (String, Array) (defaults to: nil)


18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/tailor/configuration/file_set.rb', line 18

def initialize(file_expression=nil, style=nil)
  @style = if style
    Style.new.to_hash.merge(style)
  else
    Style.new.to_hash
  end

  self[:style] = @style

  file_expression ||= DEFAULT_GLOB
  @file_list = build_file_list(file_expression)
  self[:file_list] = @file_list
end