Module: Battlestation
- Defined in:
- lib/battlestation.rb,
lib/battlestation/ui.rb,
lib/battlestation/cli.rb,
lib/battlestation/plan.rb,
lib/battlestation/task.rb,
lib/battlestation/version.rb,
lib/battlestation/operations.rb,
lib/battlestation/operations/runner.rb,
lib/battlestation/operations/process_check.rb,
lib/battlestation/operations/executable_check.rb,
lib/battlestation/operations/file_exists_check.rb
Defined Under Namespace
Modules: Operations Classes: CLI, Plan, Task, UI
Constant Summary collapse
- VERSION =
"0.0.3"
Class Attribute Summary collapse
-
.ui ⇒ Object
UI output.
Class Method Summary collapse
-
.load(filename) ⇒ Object
Load the Battlestation or Battlestation.rb file.
-
.plan(opts = {}, &block) ⇒ Object
Plan a new battlestation.
Class Attribute Details
Class Method Details
.load(filename) ⇒ Object
Load the Battlestation or Battlestation.rb file
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/battlestation.rb', line 15 def load(filename) plan = eval(File.read(filename)) return plan rescue SyntaxError, NameError Battlestation.ui.error("Your Battlestation has syntax errors.") return nil rescue Battlestation.ui.error("Some error occured, but we're not sure what happened.") return nil end |