Class: DRG::FileContext::BlockDef
- Inherits:
-
Definition
- Object
- Definition
- DRG::FileContext::BlockDef
- Defined in:
- lib/drg/file_context.rb
Instance Attribute Summary
Attributes inherited from Definition
Instance Method Summary collapse
- #block? ⇒ Boolean
-
#initialize(name, body, opener, line_number, closer = nil) ⇒ BlockDef
constructor
A new instance of BlockDef.
Methods inherited from Definition
Methods included from NullDefinition
Constructor Details
#initialize(name, body, opener, line_number, closer = nil) ⇒ BlockDef
Returns a new instance of BlockDef.
195 196 197 198 |
# File 'lib/drg/file_context.rb', line 195 def initialize(name, body, opener, line_number, closer = nil) super(name, line_number, !!closer) # not open if closer present (single line block) @body, @opener, @closer, = body, opener, closer end |
Instance Method Details
#block? ⇒ Boolean
200 201 202 |
# File 'lib/drg/file_context.rb', line 200 def block? true end |