Class: Tutor::Attributes::Block

Inherits:
Object
  • Object
show all
Defined in:
lib/tutor/attributes/block.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Block

Returns a new instance of Block.



5
6
7
# File 'lib/tutor/attributes/block.rb', line 5

def initialize(&block)
  self.tap { |b| @block = block }
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



3
4
5
# File 'lib/tutor/attributes/block.rb', line 3

def block
  @block
end