Class: MendixBridge::ChangePlanner::Result
- Inherits:
-
Data
- Object
- Data
- MendixBridge::ChangePlanner::Result
- Defined in:
- lib/mendix_bridge/change_planner.rb
Instance Attribute Summary collapse
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
-
#preserved_undeclared ⇒ Object
readonly
Returns the value of attribute preserved_undeclared.
Instance Method Summary collapse
Instance Attribute Details
#operations ⇒ Object (readonly)
Returns the value of attribute operations
11 12 13 |
# File 'lib/mendix_bridge/change_planner.rb', line 11 def operations @operations end |
#preserved_undeclared ⇒ Object (readonly)
Returns the value of attribute preserved_undeclared
11 12 13 |
# File 'lib/mendix_bridge/change_planner.rb', line 11 def preserved_undeclared @preserved_undeclared end |
Instance Method Details
#blocked? ⇒ Boolean
18 19 20 |
# File 'lib/mendix_bridge/change_planner.rb', line 18 def blocked? operations.any? { |operation| operation.action == "blocked" } end |
#counts ⇒ Object
12 13 14 15 16 |
# File 'lib/mendix_bridge/change_planner.rb', line 12 def counts operations.each_with_object(Hash.new(0)) do |operation, result| result[operation.action] += 1 end.sort.to_h end |
#to_h ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/mendix_bridge/change_planner.rb', line 22 def to_h { operations: operations.map(&:to_h), counts:, preserved_undeclared: } end |