Class: Gorgon::JobDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/gorgon/job_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ JobDefinition

Returns a new instance of JobDefinition.



7
8
9
10
11
12
# File 'lib/gorgon/job_definition.rb', line 7

def initialize(opts={})
  @file_queue_name = opts[:file_queue_name]
  @reply_exchange_name = opts[:reply_exchange_name]
  @callbacks = opts[:callbacks]
  @sync = opts[:sync]
end

Instance Attribute Details

#callbacksObject

Returns the value of attribute callbacks.



5
6
7
# File 'lib/gorgon/job_definition.rb', line 5

def callbacks
  @callbacks
end

#file_queue_nameObject

Returns the value of attribute file_queue_name.



5
6
7
# File 'lib/gorgon/job_definition.rb', line 5

def file_queue_name
  @file_queue_name
end

#reply_exchange_nameObject

Returns the value of attribute reply_exchange_name.



5
6
7
# File 'lib/gorgon/job_definition.rb', line 5

def reply_exchange_name
  @reply_exchange_name
end

#syncObject

Returns the value of attribute sync.



5
6
7
# File 'lib/gorgon/job_definition.rb', line 5

def sync
  @sync
end

Instance Method Details

#to_jsonObject



14
15
16
# File 'lib/gorgon/job_definition.rb', line 14

def to_json
  Yajl::Encoder.encode(to_hash)
end