Module: Roda::RodaPlugins::BridgetownRoutes::ResponseMethods

Defined in:
bridgetown-routes/lib/roda/plugins/bridgetown_routes.rb

Instance Method Summary collapse

Instance Method Details

#_fake_resource_view(view_class:, roda_app:, bridgetown_site:) ⇒ Object



163
164
165
166
167
168
169
170
171
172
173
# File 'bridgetown-routes/lib/roda/plugins/bridgetown_routes.rb', line 163

def _fake_resource_view(view_class:, roda_app:, bridgetown_site:)
  @_fake_resource_views ||= {}
  @_fake_resource_views[view_class] ||= view_class.new(
    # TODO: use a Stuct for better performance...?
    HashWithDotAccess::Hash.new({
      data: {},
      roda_app:,
      site: bridgetown_site,
    })
  )
end

#_front_matter_line_countObject

we need to know where the real template starts for good error reporting



161
# File 'bridgetown-routes/lib/roda/plugins/bridgetown_routes.rb', line 161

def _front_matter_line_count = @_front_matter_line_count

#_route_file_codeObject

template string provided, if available, by the saved code block



158
# File 'bridgetown-routes/lib/roda/plugins/bridgetown_routes.rb', line 158

def _route_file_code = @_route_file_code