Sha256: 9398fc1be7106bd1735b12b65865a23feb221284e74de73327078d55ab321bf9

Contents?: true

Size: 481 Bytes

Versions: 2

Compression:

Stored size: 481 Bytes

Contents

module Turnip
  module StepLoader
    extend self

    attr_accessor :steps_loaded

    def load_steps
      return if steps_loaded?
      load_step_files
      self.steps_loaded = true
    end

    def steps_loaded?
      @steps_loaded
    end

    private

    def load_step_files
      Turnip::Config.step_dirs.each do |dir|
        Pathname.glob(Pathname.new(dir) + '**' + "*steps.rb").each do |step_file|
          load step_file, true
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
turnip-0.3.1 lib/turnip/step_loader.rb
turnip-0.3.0 lib/turnip/step_loader.rb