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.
5 6 7 8 |
# File 'lib/table_beet/loader.rb', line 5 def initialize(config = {}) @suffix = config[:suffix] || '_steps.rb' @directory = config[:path] || './spec' end |
Instance Method Details
#display_pattern ⇒ Object
23 24 25 |
# File 'lib/table_beet/loader.rb', line 23 def display_pattern pattern end |
#load ⇒ Object
Returns Integer Size of loaded file.
13 14 15 16 17 |
# File 'lib/table_beet/loader.rb', line 13 def load # https://github.com/jnicklas/turnip#where-to-place-steps paths.each { |f| require f } paths.length end |
#paths ⇒ Object
19 20 21 |
# File 'lib/table_beet/loader.rb', line 19 def paths Pathname.glob(pattern) end |