Sha256: 8fab7bd5e2bdc1b5a4d50fbf794eeb6ea69b0781c16b85049dbbf354e326f529

Contents?: true

Size: 525 Bytes

Versions: 9

Compression:

Stored size: 525 Bytes

Contents

module Rack::App::FrontEnd::EndpointMethods

  def render(template_path, variables={}, options={}, &block)
    options = {:layout_path => self.class.layout}.merge(options)

    scope = Rack::App::FrontEnd::Template::Scope.new
    scope.extend(self.class.helpers)
    Rack::App::FrontEnd::Utils.link_instance_variables(self, scope)

    full_path = Rack::App::Utils.expand_path(template_path)
    template = Rack::App::FrontEnd::Template.new(full_path, options)

    return template.render(scope, variables, &block)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rack-app-front_end-0.22.2 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.22.1 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.22.0 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.21.0 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.20.0 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.19.0 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.18.0 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.17.0 lib/rack/app/front_end/endpoint_methods.rb
rack-app-front_end-0.16.0 lib/rack/app/front_end/endpoint_methods.rb