Class: Fylorg::Base

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_opts) ⇒ Base

Returns a new instance of Base.



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

def initialize(raw_opts)
  @opts = raw_opts.slice(*%w[dictionary out root types]).transform_keys(&:to_sym)
end

Instance Attribute Details

#optsObject

Returns the value of attribute opts.



9
10
11
# File 'lib/fylorg.rb', line 9

def opts
  @opts
end

Instance Method Details

#organize!Object



15
16
17
18
19
20
21
# File 'lib/fylorg.rb', line 15

def organize!
  Fylorg::Fileman.new.relocate!(
    *Fylorg::Matcher.new.categorize(
      *Fylorg::Fileman.new.load_files_for_processing(opts)
    )
  )
end