Sha256: e110991ccf0e8ab93ff1345d218eb5811358572bb5de08c77801de54fe5921b8
Contents?: true
Size: 470 Bytes
Versions: 10
Compression:
Stored size: 470 Bytes
Contents
class ApplicationController < Sinatra::Base # Application manifest file accessor method helpers do def application(*args) html = String.new args.map(&:to_sym).each do |arg| html << stylesheet('application') if %i[css stylesheet].include? arg html << javascript('application') if %i[js javascript].include? arg end html rescue raise ArgumentError.new "Expected arguments to be any of: #{css+js}" end end end
Version data entries
10 entries across 10 versions & 1 rubygems