Class: Decode::Language::Ruby::Call
- Inherits:
-
Definition
- Object
- Definition
- Decode::Language::Ruby::Call
- Defined in:
- lib/decode/language/ruby/call.rb
Overview
A Ruby-specific block which might carry other definitions.
Instance Attribute Summary
Attributes inherited from Definition
#comments, #language, #name, #parent
Instance Method Summary collapse
-
#container? ⇒ Boolean
A block can sometimes be a container for other definitions.
-
#long_form ⇒ Object
The long form of the class.
-
#qualified_form ⇒ Object
The fully qualified name of the block.
-
#short_form ⇒ Object
The short form of the class.
Methods inherited from Definition
#convert, #documentation, #initialize, #inspect, #location, #multiline?, #nested?, #nested_name, #path, #path_name, #qualified_name, #start_with?, #text
Constructor Details
This class inherits a constructor from Decode::Definition
Instance Method Details
#container? ⇒ Boolean
A block can sometimes be a container for other definitions.
14 15 16 |
# File 'lib/decode/language/ruby/call.rb', line 14 def container? false end |
#long_form ⇒ Object
The long form of the class. e.g. ‘foo(:bar)`.
26 27 28 29 30 31 32 |
# File 'lib/decode/language/ruby/call.rb', line 26 def long_form if @node.location.line == @node.location.last_line @node.location.expression.source else self.short_form end end |
#qualified_form ⇒ Object
The fully qualified name of the block. e.g. ‘class ::Barnyard::Dog`.
36 37 38 |
# File 'lib/decode/language/ruby/call.rb', line 36 def qualified_form self.qualified_name end |
#short_form ⇒ Object
The short form of the class. e.g. ‘foo`.
20 21 22 |
# File 'lib/decode/language/ruby/call.rb', line 20 def short_form @name.to_s end |