Class: ClosingComments::Commentable
- Inherits:
-
Object
- Object
- ClosingComments::Commentable
show all
- Extended by:
- Forwardable
- Defined in:
- lib/closing_comments/commentable.rb
Defined Under Namespace
Classes: Block, Class, Module
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Commentable.
11
12
13
|
# File 'lib/closing_comments/commentable.rb', line 11
def initialize(node)
@node = node
end
|
Instance Method Details
#ending ⇒ Object
23
24
25
|
# File 'lib/closing_comments/commentable.rb', line 23
def ending
"end # #{entity} #{name}"
end
|
#name ⇒ Object
15
16
17
|
# File 'lib/closing_comments/commentable.rb', line 15
def name
@name ||= name!(children.first)
end
|
#single_line? ⇒ Boolean
19
20
21
|
# File 'lib/closing_comments/commentable.rb', line 19
def single_line?
first_line == last_line
end
|