class Block
A Ruby-specific block which might carry other definitions.
Definitions
def container?
A block can sometimes be a container for other definitions.
Implementation
def container?
true
end
def short_form
The short form of the block.
e.g. foo
.
Implementation
def short_form
@name.to_s
end
def long_form
The long form of the block.
e.g. foo(:bar)
.
Implementation
def long_form
if @node.location.line == @node.location.last_line
@node.location.expression.source
else
@node.children[0].location.expression.source
end
end
def qualified_form
The fully qualified name of the block.
e.g. ::Barnyard::foo
.
Implementation
def qualified_form
self.qualified_name
end