Class: CaseCheck::Cfinclude

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

Overview

Reference as <cfinclude template=

Instance Attribute Summary collapse

Attributes inherited from Reference

#line, #source, #text

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Reference

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

Constructor Details

#initialize(source, text, line) ⇒ Cfinclude

Returns a new instance of Cfinclude.



13
14
15
16
17
# File 'lib/case_check/references/cfinclude.rb', line 13

def initialize(source, text, line)
  super
  @expected_path = substituted_text
  @resolved_to = resolve_in(File.dirname(source.filename))
end

Instance Attribute Details

#expected_pathObject

Returns the value of attribute expected_path.



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

def expected_path
  @expected_path
end

#resolved_toObject

Returns the value of attribute resolved_to.



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

def resolved_to
  @resolved_to
end

Class Method Details

.search(source) ⇒ Object



7
8
9
10
11
# File 'lib/case_check/references/cfinclude.rb', line 7

def self.search(source)
  source.scan_for_tag('cfinclude') do |text, attributes, line_number|
    new(source, attributes[:template], line_number)
  end
end