Class: UniRails::App::Views
- Inherits:
-
Object
- Object
- UniRails::App::Views
- Includes:
- Singleton
- Defined in:
- lib/uni_rails/app/views.rb
Constant Summary collapse
- DEFAULT_LAYOUT =
<<~HTML <!DOCTYPE html> <html> <head> <title>Template</title> <meta name="viewport" content="width=device-width,initial-scale=1"> <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= uni_rails_css_stylesheet %> <%= uni_rails_import_map_tag %> <%= uni_rails_javascript_script %> </head> <body> <%= yield %> </body> </html> HTML
Instance Attribute Summary collapse
-
#views ⇒ Object
Returns the value of attribute views.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Views
constructor
A new instance of Views.
Constructor Details
#initialize ⇒ Views
Returns a new instance of Views.
27 28 29 |
# File 'lib/uni_rails/app/views.rb', line 27 def initialize @views = { 'layouts/application.html.erb' => DEFAULT_LAYOUT } end |
Instance Attribute Details
#views ⇒ Object
Returns the value of attribute views.
26 27 28 |
# File 'lib/uni_rails/app/views.rb', line 26 def views @views end |
Class Method Details
.view_paths ⇒ Object
31 32 33 |
# File 'lib/uni_rails/app/views.rb', line 31 def self.view_paths [ActionView::FixtureResolver.new(instance.views)] end |