Class: Houdini::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/houdini_rails/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options) ⇒ Task

Returns a new instance of Task.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/houdini_rails/task.rb', line 5

def initialize(name, options)
  @name = name
  @api = options[:api] || "simple"
  @on = options[:on] || :after_create
  @if = options[:if] || true
  @price = options[:price]
  @title = options[:title]
  @form_template = options[:form_template]
  @text = options[:text]
  @after_submit = options[:after_submit]
  @on_task_completion = options[:on_task_completion] || :update_attributes
  @matched_answers_size = options[:matched_answers_size]
  @max_iterations = options[:max_iterations]
end

Instance Attribute Details

#after_submitObject

Returns the value of attribute after_submit.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def after_submit
  @after_submit
end

#apiObject

Returns the value of attribute api.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def api
  @api
end

#form_templateObject

Returns the value of attribute form_template.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def form_template
  @form_template
end

#ifObject

Returns the value of attribute if.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def if
  @if
end

#matched_answers_sizeObject

Returns the value of attribute matched_answers_size.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def matched_answers_size
  @matched_answers_size
end

#max_iterationsObject

Returns the value of attribute max_iterations.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def max_iterations
  @max_iterations
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def name
  @name
end

#onObject

Returns the value of attribute on.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def on
  @on
end

#on_task_completionObject

Returns the value of attribute on_task_completion.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def on_task_completion
  @on_task_completion
end

#priceObject

Returns the value of attribute price.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def price
  @price
end

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def text
  @text
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/houdini_rails/task.rb', line 3

def title
  @title
end