Class: Routes::RenameDescendantsService::RouteChanges
- Inherits:
-
Object
- Object
- Routes::RenameDescendantsService::RouteChanges
- Defined in:
- app/services/routes/rename_descendants_service.rb
Instance Attribute Summary collapse
-
#old_name_of_parent ⇒ Object
readonly
Returns the value of attribute old_name_of_parent.
-
#old_path_of_parent ⇒ Object
readonly
Returns the value of attribute old_path_of_parent.
-
#saved_change_to_parent_name ⇒ Object
readonly
Returns the value of attribute saved_change_to_parent_name.
-
#saved_change_to_parent_path ⇒ Object
readonly
Returns the value of attribute saved_change_to_parent_path.
Instance Method Summary collapse
-
#initialize(changes) ⇒ RouteChanges
constructor
A new instance of RouteChanges.
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_parent ⇒ Object (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_parent ⇒ Object (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_name ⇒ Object (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_path ⇒ Object (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 |