Class: Routes::RenameDescendantsService::RouteChanges

Inherits:
Object
  • Object
show all
Defined in:
app/services/routes/rename_descendants_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(changes) ⇒ RouteChanges

Returns a new instance of RouteChanges.



9
10
11
12
13
14
15
16
17
# File 'app/services/routes/rename_descendants_service.rb', line 9

def initialize(changes)
  path_details = changes.fetch(:path)
  name_details = changes.fetch(:name)

  @saved_change_to_parent_path = path_details.fetch(:saved)
  @old_path_of_parent = path_details.fetch(:old_value)
  @saved_change_to_parent_name = name_details.fetch(:saved)
  @old_name_of_parent = name_details.fetch(:old_value)
end

Instance Attribute Details

#old_name_of_parentObject (readonly)

Returns the value of attribute old_name_of_parent.



7
8
9
# File 'app/services/routes/rename_descendants_service.rb', line 7

def old_name_of_parent
  @old_name_of_parent
end

#old_path_of_parentObject (readonly)

Returns the value of attribute old_path_of_parent.



7
8
9
# File 'app/services/routes/rename_descendants_service.rb', line 7

def old_path_of_parent
  @old_path_of_parent
end

#saved_change_to_parent_nameObject (readonly)

Returns the value of attribute saved_change_to_parent_name.



7
8
9
# File 'app/services/routes/rename_descendants_service.rb', line 7

def saved_change_to_parent_name
  @saved_change_to_parent_name
end

#saved_change_to_parent_pathObject (readonly)

Returns the value of attribute saved_change_to_parent_path.



7
8
9
# File 'app/services/routes/rename_descendants_service.rb', line 7

def saved_change_to_parent_path
  @saved_change_to_parent_path
end