Class: CaseCheck::Cfmodule

Inherits:
Reference
  • Object
show all
Defined in:
lib/case_check/references/cfmodule.rb

Overview

Reference as <cfmodule name= or <cfmodule template=

Direct Known Subclasses

Name, Template

Defined Under Namespace

Classes: Name, Template

Instance Attribute Summary collapse

Attributes inherited from Reference

#line, #source, #text

Class Method Summary collapse

Methods inherited from Reference

#message, #resolution, #substituted_text, substitutions, #type_name

Instance Attribute Details

#expected_pathObject (readonly)

Returns the value of attribute expected_path.



5
6
7
# File 'lib/case_check/references/cfmodule.rb', line 5

def expected_path
  @expected_path
end

#resolved_toObject (readonly)

Returns the value of attribute resolved_to.



5
6
7
# File 'lib/case_check/references/cfmodule.rb', line 5

def resolved_to
  @resolved_to
end

Class Method Details

.search(source) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/case_check/references/cfmodule.rb', line 8

def search(source)
  source.scan_for_tag('cfmodule') do |text, attributes, line_number|
    if attributes.keys.include?(:name)
      Name.new(source, attributes[:name], line_number)
    elsif attributes.keys.include?(:template)
      Template.new(source, attributes[:template], line_number)
    else
      $stderr.puts "Neither name nor template for cfmodule on line #{line_number} of #{source.filename}"
    end
  end.compact
end