Class: JsonUpdater::JsonStructureUpdater
- Inherits:
-
Object
- Object
- JsonUpdater::JsonStructureUpdater
- Defined in:
- lib/json_updater/json_structure_updater.rb
Instance Attribute Summary collapse
-
#json_changeable ⇒ Object
readonly
Returns the value of attribute json_changeable.
-
#json_etalon ⇒ Object
readonly
Returns the value of attribute json_etalon.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json_changeable:, json_etalon:) ⇒ JsonStructureUpdater
constructor
A new instance of JsonStructureUpdater.
- #update_json ⇒ Object
Constructor Details
#initialize(json_changeable:, json_etalon:) ⇒ JsonStructureUpdater
Returns a new instance of JsonStructureUpdater.
11 12 13 14 |
# File 'lib/json_updater/json_structure_updater.rb', line 11 def initialize(json_changeable:, json_etalon:) @json_changeable = json_changeable @json_etalon = json_etalon.dup end |
Instance Attribute Details
#json_changeable ⇒ Object (readonly)
Returns the value of attribute json_changeable.
5 6 7 |
# File 'lib/json_updater/json_structure_updater.rb', line 5 def json_changeable @json_changeable end |
#json_etalon ⇒ Object (readonly)
Returns the value of attribute json_etalon.
5 6 7 |
# File 'lib/json_updater/json_structure_updater.rb', line 5 def json_etalon @json_etalon end |
Class Method Details
.update_json(json_changeable:, json_etalon:) ⇒ Object
7 8 9 |
# File 'lib/json_updater/json_structure_updater.rb', line 7 def self.update_json(json_changeable:, json_etalon:) new(json_changeable: json_changeable, json_etalon: json_etalon).update_json end |
Instance Method Details
#update_json ⇒ Object
16 17 18 |
# File 'lib/json_updater/json_structure_updater.rb', line 16 def update_json update_json_keys end |