module TTY::Option::Inheritance
Public Instance Methods
inherited(subclass)
click to toggle source
When class is inherited copy over parameter definitions This allows for definition of global parameters without affecting child class parameters and vice versa.
Calls superclass method
# File lib/tty/option.rb, line 27 def inherited(subclass) subclass.instance_variable_set(:@parameters, @parameters.dup) super end