Class: CliTasks::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/clitasks/runner.rb

Class Method Summary collapse

Class Method Details

.run(*files) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/clitasks/runner.rb', line 3

def self.run(*files)
  world.reset
  files.flat_map{|file|
    Dir[File.directory?(file) && [file,'/**/*'].join || file]
  }.map{|file|
    load File.expand_path(file)
    world.stories.last.file = file
  }
end

.worldObject



13
14
15
# File 'lib/clitasks/runner.rb', line 13

def self.world
  @world ||= World.instance
end