Class: ChemistryKit::CLI::Helpers::FormulaLoader
- Inherits:
-
Object
- Object
- ChemistryKit::CLI::Helpers::FormulaLoader
- Defined in:
- lib/chemistrykit/cli/helpers/formula_loader.rb
Overview
this loader returns the formulas found in a path according to these rules:
-
directories loaded in alpha order
-
children directories loaded before parents
-
files loaded in alpha order
-
lib directories are loaded before any other
-
rules stack
Instance Method Summary collapse
- #get_formulas(path) ⇒ Object
-
#initialize ⇒ FormulaLoader
constructor
A new instance of FormulaLoader.
Constructor Details
#initialize ⇒ FormulaLoader
Returns a new instance of FormulaLoader.
14 15 16 |
# File 'lib/chemistrykit/cli/helpers/formula_loader.rb', line 14 def initialize @formulas = [] end |
Instance Method Details
#get_formulas(path) ⇒ Object
18 19 20 21 |
# File 'lib/chemistrykit/cli/helpers/formula_loader.rb', line 18 def get_formulas(path) gather(path) @formulas end |