Class: Makimono::Command::Build
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Makimono::Command::Build
- Defined in:
- lib/makimono/command/build.rb
Instance Method Summary collapse
Instance Method Details
#load_user_config ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/makimono/command/build.rb', line 11 def load_user_config user_config = if File.file?([:config]) yaml = File.read([:config]) filename = File.basename([:config]) YAML.safe_load(yaml, permitted_classes: [Date, Time], filename: filename, symbolize_names: true) else {} end @config = Configuration.new(user_config) end |
#load_user_library ⇒ Object
22 23 24 |
# File 'lib/makimono/command/build.rb', line 22 def load_user_library Dir[File.join(@config[:library], '**/*.rb')].sort.each { |f| require f } if Dir.exist?(@config[:library]) end |