Class: Stall::ViewGenerator::ViewTemplate
- Inherits:
-
Object
- Object
- Stall::ViewGenerator::ViewTemplate
- Defined in:
- lib/generators/stall/view/view_generator.rb
Defined Under Namespace
Classes: ViewNotFound
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
Instance Method Summary collapse
-
#initialize(file_path) ⇒ ViewTemplate
constructor
A new instance of ViewTemplate.
- #source_path ⇒ Object
- #target_path ⇒ Object
Constructor Details
#initialize(file_path) ⇒ ViewTemplate
Returns a new instance of ViewTemplate.
22 23 24 |
# File 'lib/generators/stall/view/view_generator.rb', line 22 def initialize(file_path) @file_path = file_path end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
20 21 22 |
# File 'lib/generators/stall/view/view_generator.rb', line 20 def file_path @file_path end |
Instance Method Details
#source_path ⇒ Object
26 27 28 |
# File 'lib/generators/stall/view/view_generator.rb', line 26 def source_path source_file_for(file_path_with_ext) end |
#target_path ⇒ Object
30 31 32 |
# File 'lib/generators/stall/view/view_generator.rb', line 30 def target_path "app/views/#{ file_path_with_ext }" end |