Class: CaseCheck::CustomTag
- Defined in:
- lib/case_check/references/custom_tag.rb
Overview
Reference as cf_name (or CF_name)
Class Attribute Summary collapse
Instance Attribute Summary collapse
-
#expected_path ⇒ Object
readonly
Returns the value of attribute expected_path.
-
#resolved_to ⇒ Object
readonly
Returns the value of attribute resolved_to.
Attributes inherited from Reference
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(source, text, line) ⇒ CustomTag
constructor
A new instance of CustomTag.
Methods inherited from Reference
#message, #resolution, #substituted_text, substitutions, #type_name
Constructor Details
#initialize(source, text, line) ⇒ CustomTag
Returns a new instance of CustomTag.
35 36 37 38 39 |
# File 'lib/case_check/references/custom_tag.rb', line 35 def initialize(source, text, line) super @expected_path = text[3, text.size] + ".cfm" @resolved_to = resolve end |
Class Attribute Details
.directories ⇒ Object
10 11 12 |
# File 'lib/case_check/references/custom_tag.rb', line 10 def directories @directories ||= [] end |
Instance Attribute Details
#expected_path ⇒ Object (readonly)
Returns the value of attribute expected_path.
5 6 7 |
# File 'lib/case_check/references/custom_tag.rb', line 5 def expected_path @expected_path end |
#resolved_to ⇒ Object (readonly)
Returns the value of attribute resolved_to.
5 6 7 |
# File 'lib/case_check/references/custom_tag.rb', line 5 def resolved_to @resolved_to end |
Class Method Details
.recursive_directories ⇒ Object
20 21 22 23 24 |
# File 'lib/case_check/references/custom_tag.rb', line 20 def recursive_directories directories + directories.collect do |dir| collect_subdirs(dir) end.flatten end |
.search(source) ⇒ Object
14 15 16 17 18 |
# File 'lib/case_check/references/custom_tag.rb', line 14 def search(source) source.scan(/<(CF_(\w+))/i) do |match_data, line_number| self.new(source, match_data[1], line_number) end end |