Class: ScoutAgent::Assignment

Inherits:
Object
  • Object
show all
Includes:
Tracked
Defined in:
lib/scout_agent/assignment.rb,
lib/scout_agent/assignment/stop.rb,
lib/scout_agent/assignment/queue.rb,
lib/scout_agent/assignment/reset.rb,
lib/scout_agent/assignment/start.rb,
lib/scout_agent/assignment/status.rb,
lib/scout_agent/assignment/identify.rb,
lib/scout_agent/assignment/snapshot.rb,
lib/scout_agent/assignment/upload_log.rb,
lib/scout_agent/assignment/configuration.rb

Direct Known Subclasses

Configuration, Identify, Queue, Reset, Snapshot, Start, Status, Stop, UploadLog

Defined Under Namespace

Classes: Configuration, Identify, Queue, Reset, Snapshot, Start, Status, Stop, UploadLog

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Tracked

#clear_status, #force_status_database_reload, #status, #status_database, #status_log

Constructor Details

#initialize(switches, other_args) ⇒ Assignment

Returns a new instance of Assignment.



18
19
20
21
22
23
# File 'lib/scout_agent/assignment.rb', line 18

def initialize(switches, other_args)
  @switches   = switches
  @other_args = other_args
  @user       = nil
  @group      = nil
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



27
28
29
# File 'lib/scout_agent/assignment.rb', line 27

def group
  @group
end

#other_argsObject (readonly)

Returns the value of attribute other_args.



27
28
29
# File 'lib/scout_agent/assignment.rb', line 27

def other_args
  @other_args
end

#switchesObject (readonly)

Returns the value of attribute switches.



27
28
29
# File 'lib/scout_agent/assignment.rb', line 27

def switches
  @switches
end

#userObject (readonly)

Returns the value of attribute user.



27
28
29
# File 'lib/scout_agent/assignment.rb', line 27

def user
  @user
end

Instance Method Details

#prepare_and_executeObject



29
30
31
32
33
# File 'lib/scout_agent/assignment.rb', line 29

def prepare_and_execute
  read_the_plan
  choose_identity
  execute
end