Method: AutomationObject::BluePrint::HashAdapter::Modal#merge_views

Defined in:
lib/automation_object/blue_print/hash_adapter/modal.rb

#merge_viewsObject

Method to take views and merge into this composite



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/automation_object/blue_print/hash_adapter/modal.rb', line 39

def merge_views
  top_hash = top.hash

  return unless top_hash.is_a?(Hash)
  return unless top_hash[:views].is_a?(Hash)
  top_view_hash = top_hash[:views]

  included_views.each do |included_view|
    next unless top_view_hash[included_view].is_a?(Hash)
    self.hash = hash.deep_merge(top_view_hash[included_view])
  end
end