Class: ActionviewPrecompiler::TemplateFile
- Inherits:
-
Object
- Object
- ActionviewPrecompiler::TemplateFile
- Defined in:
- lib/actionview_precompiler/template_file.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#fullpath ⇒ Object
readonly
Returns the value of attribute fullpath.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#relative_path ⇒ Object
readonly
Returns the value of attribute relative_path.
-
#virtual_path ⇒ Object
readonly
Returns the value of attribute virtual_path.
Instance Method Summary collapse
-
#initialize(fullpath, relative_path) ⇒ TemplateFile
constructor
A new instance of TemplateFile.
- #partial? ⇒ Boolean
Constructor Details
#initialize(fullpath, relative_path) ⇒ TemplateFile
Returns a new instance of TemplateFile.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/actionview_precompiler/template_file.rb', line 6 def initialize(fullpath, relative_path) @fullpath = fullpath @relative_path = relative_path @virtual_path = relative_path.slice(0, relative_path.index(".")) parsed = ParsedFilename.new(relative_path) @prefix = parsed.prefix @action = parsed.action @partial = parsed.partial? @details = parsed.details end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'lib/actionview_precompiler/template_file.rb', line 4 def action @action end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
4 5 6 |
# File 'lib/actionview_precompiler/template_file.rb', line 4 def details @details end |
#fullpath ⇒ Object (readonly)
Returns the value of attribute fullpath.
3 4 5 |
# File 'lib/actionview_precompiler/template_file.rb', line 3 def fullpath @fullpath end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
4 5 6 |
# File 'lib/actionview_precompiler/template_file.rb', line 4 def prefix @prefix end |
#relative_path ⇒ Object (readonly)
Returns the value of attribute relative_path.
3 4 5 |
# File 'lib/actionview_precompiler/template_file.rb', line 3 def relative_path @relative_path end |
#virtual_path ⇒ Object (readonly)
Returns the value of attribute virtual_path.
3 4 5 |
# File 'lib/actionview_precompiler/template_file.rb', line 3 def virtual_path @virtual_path end |
Instance Method Details
#partial? ⇒ Boolean
18 19 20 |
# File 'lib/actionview_precompiler/template_file.rb', line 18 def partial? @partial end |