class
v7.0.0 - Show latest stable - Superclass: Object

No documentation available for this class.

Constants

EXPLICIT_DEPENDENCY = /# Template Dependency: (\\S+)/

IDENTIFIER = /\n[[:alpha:]_] # at least one uppercase letter, lowercase letter or underscore\n[[:word:]]* # followed by optional letters, numbers or underscores\n/x

LAYOUT_DEPENDENCY = /\\A\n(?:\\s*\\(?\\s*) # optional opening paren surrounded by spaces\n(?:.*?#{LAYOUT_HASH_KEY}) # check if the line has layout key declaration\n(?:#{STRING}|#{VARIABLE_OR_METHOD_CHAIN}) # finally, the dependency name of interest\n/xm

LAYOUT_HASH_KEY = /\n(?:\\blayout:|:layout\\s*=>) # layout key in either old or new style hash syntax\n\\s* # followed by optional spaces\n/x

PARTIAL_HASH_KEY = /\n(?:\\bpartial:|:partial\\s*=>) # partial key in either old or new style hash syntax\n\\s* # followed by optional spaces\n/x

RENDER_ARGUMENTS = /\\A\n(?:\\s*\\(?\\s*) # optional opening paren surrounded by spaces\n(?:.*?#{PARTIAL_HASH_KEY}|#{LAYOUT_HASH_KEY})? # optional hash, up to the partial or layout key declaration\n(?:#{STRING}|#{VARIABLE_OR_METHOD_CHAIN}) # finally, the dependency name of interest\n/xm

STRING = /\n(?<quote>['"]) # an opening quote\n(?<static>.*?) # with anything inside, captured as STATIC\n\\k<quote> # and a matching closing quote\n/x

VARIABLE_OR_METHOD_CHAIN = /\n(?:\\$|@{1,2})? # optional global, instance or class variable indicator\n(?:#{IDENTIFIER}\\.)* # followed by an optional chain of zero-argument method calls\n(?<dynamic>#{IDENTIFIER}) # and a final valid identifier, captured as DYNAMIC\n/x

Attributes

[R]name
[R]template

Files

  • actionview/lib/action_view/dependency_tracker/erb_tracker.rb