Class: Dorsale::Flyboy::Task::Copy

Inherits:
Service
  • Object
show all
Defined in:
app/services/dorsale/flyboy/task/copy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Service

call

Constructor Details

#initialize(task) ⇒ Copy

Returns a new instance of Copy.



4
5
6
# File 'app/services/dorsale/flyboy/task/copy.rb', line 4

def initialize(task)
  @task = task
end

Instance Attribute Details

#copyObject

Returns the value of attribute copy.



2
3
4
# File 'app/services/dorsale/flyboy/task/copy.rb', line 2

def copy
  @copy
end

#taskObject

Returns the value of attribute task.



2
3
4
# File 'app/services/dorsale/flyboy/task/copy.rb', line 2

def task
  @task
end

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
17
# File 'app/services/dorsale/flyboy/task/copy.rb', line 8

def call
  @copy = @task.dup
  @copy.reminder_date = nil
  @copy.reminder_type = nil
  @copy.term = nil
  @copy.done = nil
  @copy.progress = nil
  @copy.assign_default_values
  @copy
end