Module: PageMagic::Elements::InheritanceHooks

Defined in:
lib/page_magic/elements.rb

Overview

hooks for objects that inherit classes that include the Elements module

Instance Method Summary collapse

Instance Method Details

#inherited(clazz) ⇒ Object

Copies parent element definitions on to subclass

Parameters:

  • clazz (Class)
    • inheritting class


10
11
12
# File 'lib/page_magic/elements.rb', line 10

def inherited(clazz)
  clazz.element_definitions.merge!(element_definitions)
end