Class: RubyCritic::ModulesLocator
- Inherits:
-
Object
- Object
- RubyCritic::ModulesLocator
- Defined in:
- lib/rubycritic/analysers/helpers/modules_locator.rb
Instance Method Summary collapse
- #first_name ⇒ Object
-
#initialize(analysed_module) ⇒ ModulesLocator
constructor
A new instance of ModulesLocator.
- #names ⇒ Object
Constructor Details
#initialize(analysed_module) ⇒ ModulesLocator
Returns a new instance of ModulesLocator.
7 8 9 |
# File 'lib/rubycritic/analysers/helpers/modules_locator.rb', line 7 def initialize(analysed_module) @analysed_module = analysed_module end |
Instance Method Details
#first_name ⇒ Object
11 12 13 |
# File 'lib/rubycritic/analysers/helpers/modules_locator.rb', line 11 def first_name names.first end |
#names ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/rubycritic/analysers/helpers/modules_locator.rb', line 15 def names names = node.get_module_names if names.empty? name_from_path else names end end |