Class: Dotum::Rules::Use

Inherits:
AbstractRules::OptionsBase show all
Defined in:
lib/dotum/rules/use.rb

Instance Attribute Summary

Attributes inherited from AbstractRules::Base

#context

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractRules::OptionsBase

exec, #initialize

Methods inherited from AbstractRules::Base

exec, #exec, #initialize, pretty

Methods included from Dotum::RuleOptionsDSL

#eval_options_block, #expand_shorthand, #option_configs, #option_defaults, #optional, #preprocessor_methods, #register_preprocessor, #required, #shorthand, #shorthand_config, #standard, #validate_options

Methods included from Dotum::RuleDSL

#available?, #failure!, #method_missing, #package_dir, #platform?, #skip!, #state_dir, #success!, #target_dir

Constructor Details

This class inherits a constructor from Dotum::AbstractRules::OptionsBase

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Dotum::RuleDSL

Class Method Details

.expand_options(context, options) ⇒ Object



9
10
11
12
13
14
# File 'lib/dotum/rules/use.rb', line 9

def self.expand_options(context, options)
  paths = context.package_dir.glob(options[:path], &:directory?)
  paths.reject! &:hidden?

  paths.map { |p| options.merge(:path => p) }
end

Instance Method Details

#pretty_subjectObject



16
17
18
# File 'lib/dotum/rules/use.rb', line 16

def pretty_subject
  @path.pretty
end