Class: OpenStax::Utilities::Blocks::BlockBase
- Inherits:
-
Object
- Object
- OpenStax::Utilities::Blocks::BlockBase
- Includes:
- Attribeautiful
- Defined in:
- lib/openstax/utilities/blocks/block_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#captured_block ⇒ Object
Returns the value of attribute captured_block.
Instance Method Summary collapse
-
#initialize(template, partial, passed_block) ⇒ BlockBase
constructor
A new instance of BlockBase.
- #to_s ⇒ Object
Constructor Details
#initialize(template, partial, passed_block) ⇒ BlockBase
12 13 14 15 16 |
# File 'lib/openstax/utilities/blocks/block_base.rb', line 12 def initialize(template, partial, passed_block) self.h = template self.passed_block = passed_block self.partial = partial end |
Instance Attribute Details
#captured_block ⇒ Object
Returns the value of attribute captured_block.
10 11 12 |
# File 'lib/openstax/utilities/blocks/block_base.rb', line 10 def captured_block @captured_block end |
Instance Method Details
#to_s ⇒ Object
18 19 20 21 |
# File 'lib/openstax/utilities/blocks/block_base.rb', line 18 def to_s render_passed_block render_partial end |