Class: Build::Environment::Define
- Inherits:
-
Struct
- Object
- Struct
- Build::Environment::Define
- Defined in:
- lib/build/environment/constructor.rb
Overview
Represents a deferred class instantiation, binding a class and a configuration block to an environment key.
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#klass ⇒ Object
Returns the value of attribute klass.
Instance Method Summary collapse
-
#initialize(klass, &block) ⇒ Define
constructor
Initialize a define with a class and an optional configuration block.
-
#to_s ⇒ Object
Return a string representation of this define.
Constructor Details
#initialize(klass, &block) ⇒ Define
Initialize a define with a class and an optional configuration block.
16 17 18 |
# File 'lib/build/environment/constructor.rb', line 16 def initialize(klass, &block) super klass, block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block
12 13 14 |
# File 'lib/build/environment/constructor.rb', line 12 def block @block end |
#klass ⇒ Object
Returns the value of attribute klass
12 13 14 |
# File 'lib/build/environment/constructor.rb', line 12 def klass @klass end |
Instance Method Details
#to_s ⇒ Object
Return a string representation of this define.
22 23 24 |
# File 'lib/build/environment/constructor.rb', line 22 def to_s "#<#{klass} #{block ? block.source_location.join(':') : 'unknown'}>" end |