Class: Workarea::AssetEndpoints::Favicons

Inherits:
Base
  • Object
show all
Defined in:
lib/workarea/asset_endpoints/favicons.rb

Instance Attribute Summary

Attributes inherited from Base

#app, #env, #params

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Workarea::AssetEndpoints::Base

Instance Method Details

#icoObject



9
10
11
# File 'lib/workarea/asset_endpoints/favicons.rb', line 9

def ico
  find_asset('ico')&.favicon_ico
end

#resultObject



4
5
6
7
# File 'lib/workarea/asset_endpoints/favicons.rb', line 4

def result
  return unless Workarea.config.favicon_allowed_sizes.include?(params[:size])
  find_asset(params[:size])&.favicon(params[:size])
end