Class: ActionviewPrecompiler::Precompiler::Template
- Inherits:
-
Object
- Object
- ActionviewPrecompiler::Precompiler::Template
- Defined in:
- lib/actionview_precompiler/precompiler.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) ⇒ Template
constructor
A new instance of Template.
- #partial? ⇒ Boolean
Constructor Details
#initialize(fullpath, relative_path) ⇒ Template
Returns a new instance of Template.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/actionview_precompiler/precompiler.rb', line 7 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.
5 6 7 |
# File 'lib/actionview_precompiler/precompiler.rb', line 5 def action @action end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
5 6 7 |
# File 'lib/actionview_precompiler/precompiler.rb', line 5 def details @details end |
#fullpath ⇒ Object (readonly)
Returns the value of attribute fullpath.
4 5 6 |
# File 'lib/actionview_precompiler/precompiler.rb', line 4 def fullpath @fullpath end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
5 6 7 |
# File 'lib/actionview_precompiler/precompiler.rb', line 5 def prefix @prefix end |
#relative_path ⇒ Object (readonly)
Returns the value of attribute relative_path.
4 5 6 |
# File 'lib/actionview_precompiler/precompiler.rb', line 4 def relative_path @relative_path end |
#virtual_path ⇒ Object (readonly)
Returns the value of attribute virtual_path.
4 5 6 |
# File 'lib/actionview_precompiler/precompiler.rb', line 4 def virtual_path @virtual_path end |
Instance Method Details
#partial? ⇒ Boolean
19 20 21 |
# File 'lib/actionview_precompiler/precompiler.rb', line 19 def partial? @partial end |