Class: Guard::Cli::Environments::EvaluateOnly
- Inherits:
-
Object
- Object
- Guard::Cli::Environments::EvaluateOnly
- Defined in:
- lib/guard/cli/environments/evaluate_only.rb
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(options) ⇒ EvaluateOnly
constructor
A new instance of EvaluateOnly.
Constructor Details
#initialize(options) ⇒ EvaluateOnly
Returns a new instance of EvaluateOnly.
7 8 9 |
# File 'lib/guard/cli/environments/evaluate_only.rb', line 7 def initialize() @options = end |
Instance Method Details
#evaluate ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/guard/cli/environments/evaluate_only.rb', line 11 def evaluate # TODO: check bundler setup first? # # TODO: it should be easier to pass options created with init # directly to evaluator # # TODO: guardfile/DSL should interact only with a given object, and # not global Guard object (setting global state only needed before # start() is called) # Guard.init(@options) session = Guard.state.session Guardfile::Evaluator.new(session.).evaluate rescue \ Dsl::Error, Guardfile::Evaluator::NoPluginsError, Guardfile::Evaluator::NoGuardfileError, Guardfile::Evaluator::NoCustomGuardfile => e UI.error(e.) abort end |