Class: ClosingComments::Commentable::Block

Inherits:
ClosingComments::Commentable show all
Defined in:
lib/closing_comments/commentable.rb

Overview

class Module

Instance Method Summary collapse

Methods inherited from ClosingComments::Commentable

#ending, #initialize, #single_line?

Constructor Details

This class inherits a constructor from ClosingComments::Commentable

Instance Method Details

#commentable?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/closing_comments/commentable.rb', line 59

def commentable?
  dispatch.type == :send && rspec?
end

#entityObject



67
68
69
70
# File 'lib/closing_comments/commentable.rb', line 67

def entity
  return message if implicit_receiver?
  [name!(receiver), message].join('.')
end

#nameObject



63
64
65
# File 'lib/closing_comments/commentable.rb', line 63

def name
  name!(dispatch.children[2])
end