class Define
Represents a deferred class instantiation, binding a class and a configuration block to an environment key.
Definitions
def initialize(klass, &block)
Initialize a define with a class and an optional configuration block.
Signature
-
parameter
klassClass The class to instantiate.
-
parameter
blockProc An optional block used to configure the instance.
Implementation
def initialize(klass, &block)
super klass, block
end
def to_s
Return a string representation of this define.
Signature
-
returns
String A string showing the class and block source location.
Implementation
def to_s
"#<#{klass} #{block ? block.source_location.join(':') : 'unknown'}>"
end