Class: Envoi::WatchFolderUtility::WatchFolder::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition, state = nil, client = nil) ⇒ Worker

Returns a new instance of Worker.



85
86
87
88
89
90
91
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 85

def initialize(definition, state = nil, client = nil)
  @definition = definition
  @state      = state || State.new
  @client     = @watcher = client || Client.new

  process_definition(definition)
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



82
83
84
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 82

def client
  @client
end

#definitionObject

Returns the value of attribute definition.



82
83
84
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 82

def definition
  @definition
end

#last_poll_timeObject

Returns the value of attribute last_poll_time.



82
83
84
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 82

def last_poll_time
  @last_poll_time
end

#nameObject

Returns the value of attribute name.



82
83
84
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 82

def name
  @name
end

#previous_poll_timeObject

Returns the value of attribute previous_poll_time.



82
83
84
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 82

def previous_poll_time
  @previous_poll_time
end

#stateObject

Returns the value of attribute state.



82
83
84
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 82

def state
  @state
end

#watcherObject

Returns the value of attribute watcher.



82
83
84
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders-working.rb', line 82

def watcher
  @watcher
end