class Ivar::Declaration
Base class for all declarations
def before_init(instance, args, kwargs)
-
kwargs
(Hash
) -- Keyword arguments -
args
(Array
) -- Positional arguments -
instance
(Object
) -- The object being initialized
def before_init(instance, args, kwargs) # Base implementation does nothing end
def initialize(name, manifest)
-
name
(Symbol, String
) -- The name of the instance variable
def initialize(name, manifest) @name = name.to_sym @manifest = manifest end
def on_declare(klass)
-
klass
(Class, Module
) -- The class or module the declaration is added to
def on_declare(klass) # Base implementation does nothing end