Class: TableBeet::Loader
- Inherits:
-
Object
- Object
- TableBeet::Loader
- Defined in:
- lib/table_beet/loader.rb
Instance Method Summary collapse
- #display_pattern ⇒ Object
-
#initialize(config = {}) ⇒ Loader
constructor
A new instance of Loader.
-
#load ⇒ Object
Integer Size of loaded file.
- #paths ⇒ Object
Constructor Details
#initialize(config = {}) ⇒ Loader
Returns a new instance of Loader.
7 8 9 10 |
# File 'lib/table_beet/loader.rb', line 7 def initialize(config = {}) @suffix = config[:suffix] || '_steps.rb' @directory = config[:path] || './spec' end |
Instance Method Details
#display_pattern ⇒ Object
25 26 27 |
# File 'lib/table_beet/loader.rb', line 25 def display_pattern pattern end |
#load ⇒ Object
Returns Integer Size of loaded file.
15 16 17 18 19 |
# File 'lib/table_beet/loader.rb', line 15 def load # https://github.com/jnicklas/turnip#where-to-place-steps paths.each { |f| Kernel.load(f, true) } paths.length end |
#paths ⇒ Object
21 22 23 |
# File 'lib/table_beet/loader.rb', line 21 def paths Pathname.glob(pattern) end |