Class: Tutor::Attributes::Block
- Inherits:
-
Object
- Object
- Tutor::Attributes::Block
- Defined in:
- lib/tutor/attributes/block.rb
Direct Known Subclasses
Tutor::Attributes::Blocks::Alias::Reader, Tutor::Attributes::Blocks::Alias::Writer, Tutor::Attributes::Blocks::Instance::Reader, Tutor::Attributes::Blocks::Instance::Writer
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Block
constructor
A new instance of Block.
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
#block ⇒ Object (readonly)
Returns the value of attribute block.
3 4 5 |
# File 'lib/tutor/attributes/block.rb', line 3 def block @block end |