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
# File 'lib/houdini-rails/task.rb', line 5

def initialize(name, options)
  @name = name
  @api = "simple" # options[:strategy]
  @on = options[:on] || :after_create
  @if = options[:if] || true
  @price = options[:price]
  @title = options[:title]
  @form_template = options[:form_template]
  @after_submit = options[:after_submit]
  @on_task_completion = options[:on_task_completion] || :update_attributes
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

#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

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/houdini-rails/task.rb', line 3

def title
  @title
end