Class: RuboCop::RSpec::Example

Inherits:
Concept
  • Object
show all
Defined in:
lib/rubocop/rspec/example.rb

Overview

Wrapper for RSpec examples

Constant Summary

Constants included from Language

Language::ALL

Instance Method Summary collapse

Methods inherited from Concept

#eql?, #hash, #initialize, #to_node

Constructor Details

This class inherits a constructor from RuboCop::RSpec::Concept

Instance Method Details

#definitionObject



23
24
25
26
27
28
29
# File 'lib/rubocop/rspec/example.rb', line 23

def definition
  if node.send_type?
    node
  else
    node.children.first
  end
end

#doc_stringObject



11
12
13
# File 'lib/rubocop/rspec/example.rb', line 11

def doc_string
  extract_doc_string(definition)
end

#implementationObject



19
20
21
# File 'lib/rubocop/rspec/example.rb', line 19

def implementation
  extract_implementation(node)
end

#metadataObject



15
16
17
# File 'lib/rubocop/rspec/example.rb', line 15

def 
  (definition)
end