Class: Build::Environment::Define

Inherits:
Struct
  • Object
show all
Defined in:
lib/build/environment/constructor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, &block) ⇒ Define

Returns a new instance of Define.


29
30
31
# File 'lib/build/environment/constructor.rb', line 29

def initialize(klass, &block)
	super klass, block
end

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block


28
29
30
# File 'lib/build/environment/constructor.rb', line 28

def block
  @block
end

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of klass


28
29
30
# File 'lib/build/environment/constructor.rb', line 28

def klass
  @klass
end

Instance Method Details

#to_sObject


33
34
35
# File 'lib/build/environment/constructor.rb', line 33

def to_s
	"#<#{klass} #{block ? block.source_location.join(':') : 'unknown'}>"
end