Class: Yap::Addon::Path
- Inherits:
-
Object
- Object
- Yap::Addon::Path
- Defined in:
- lib/yap/addon/path.rb
Instance Attribute Summary collapse
-
#references ⇒ Object
readonly
Returns the value of attribute references.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(paths, addons_config_hsh = {}) ⇒ Path
constructor
A new instance of Path.
Constructor Details
#initialize(paths, addons_config_hsh = {}) ⇒ Path
Returns a new instance of Path.
16 17 18 19 |
# File 'lib/yap/addon/path.rb', line 16 def initialize(paths, addons_config_hsh={}) @paths = paths @addons_config_hsh = addons_config_hsh end |
Instance Attribute Details
#references ⇒ Object (readonly)
Returns the value of attribute references.
14 15 16 |
# File 'lib/yap/addon/path.rb', line 14 def references @references end |
Class Method Details
.find_for_configuration(configuration) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/yap/addon/path.rb', line 4 def self.find_for_configuration(configuration) addons_config_hsh = {} if File.exists?(configuration.yap_addons_configuration_path) addons_config_hsh = YAML.load_file(configuration.yap_addons_configuration_path) end new(configuration.addon_paths.flatten, addons_config_hsh). references.sort_by(&:name) end |