Module: Sus::Shared

Defined in:
lib/sus/shared.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block.



11
12
13
# File 'lib/sus/shared.rb', line 11

def block
  @block
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/sus/shared.rb', line 10

def name
  @name
end

Class Method Details

.build(name, block) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/sus/shared.rb', line 13

def self.build(name, block)
	base = Class.new
	base.extend(Shared)
	base.name = name
	base.block = block
	
	return base
end