Sha256: b1612b68b8041a8c3852fbbfc5b46342927f07484a8c78e9ff03779ee8ba2d3c

Contents?: true

Size: 314 Bytes

Versions: 30

Compression:

Stored size: 314 Bytes

Contents

module RootPresenter
  include Gris::Presenter

  link :self do |opts|
    "#{base_url(opts)}"
  end

  link :health do |opts|
    { href: "#{base_url(opts)}/health" }
  end

  # Additional endpoint links

  private

  def base_url(opts)
    request = Grape::Request.new(opts[:env])
    request.base_url
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
gris-0.4.3 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.4.2 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.4.0 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.9 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.8 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.7 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.6 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.4 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.3 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.2 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.1 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.3.0 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.2.4 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.2.3 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.2.2 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.2.1 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.2.0 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.1.7 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.1.6 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
gris-0.1.5 lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb