Class: ResourceEvents::ChangeMilestoneService

Inherits:
BaseChangeTimeboxService show all
Defined in:
app/services/resource_events/change_milestone_service.rb

Instance Attribute Summary collapse

Attributes inherited from BaseChangeTimeboxService

#event_created_at, #resource, #user

Instance Method Summary collapse

Methods inherited from BaseChangeTimeboxService

#execute

Constructor Details

#initialize(resource, user, created_at: Time.current, old_milestone:) ⇒ ChangeMilestoneService

Returns a new instance of ChangeMilestoneService.


7
8
9
10
11
12
# File 'app/services/resource_events/change_milestone_service.rb', line 7

def initialize(resource, user, created_at: Time.current, old_milestone:)
  super(resource, user, created_at: created_at)

  @milestone = resource&.milestone
  @old_milestone = old_milestone
end

Instance Attribute Details

#milestoneObject (readonly)

Returns the value of attribute milestone


5
6
7
# File 'app/services/resource_events/change_milestone_service.rb', line 5

def milestone
  @milestone
end

#old_milestoneObject (readonly)

Returns the value of attribute old_milestone


5
6
7
# File 'app/services/resource_events/change_milestone_service.rb', line 5

def old_milestone
  @old_milestone
end