Class: Guard::Internals::State

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/internals/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmdline_opts) ⇒ State

Minimal setup for non-interactive commands (list, init, show, etc.)


12
13
14
15
16
17
18
19
# File 'lib/guard/internals/state.rb', line 12

def initialize(cmdline_opts)
  @session = Session.new(cmdline_opts)

  @scope = Scope.new

  # NOTE: must be set before anything calls Guard::UI.debug
  Debugging.start if session.debug?
end

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope


21
22
23
# File 'lib/guard/internals/state.rb', line 21

def scope
  @scope
end

#sessionObject (readonly)

Returns the value of attribute session


22
23
24
# File 'lib/guard/internals/state.rb', line 22

def session
  @session
end