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

Version Path
eucalypt-0.3.2 lib/eucalypt/core/templates/eucalypt/config/manifest.rb
eucalypt-0.3.1 lib/eucalypt/core/templates/eucalypt/config/manifest.rb
eucalypt-0.3.0 lib/eucalypt/core/templates/eucalypt/config/manifest.rb
eucalypt-0.2.2 lib/eucalypt/eucalypt-core/templates/eucalypt/config/manifest.rb
eucalypt-0.2.1 lib/eucalypt/eucalypt-core/templates/eucalypt/config/manifest.rb
eucalypt-0.2.0 lib/eucalypt/eucalypt-core/templates/eucalypt/config/manifest.rb
eucalypt-0.1.3 lib/eucalypt/eucalypt-core/templates/eucalypt/config/manifest.rb
eucalypt-0.1.2 lib/eucalypt/eucalypt-core/templates/eucalypt/config/manifest.rb
eucalypt-0.1.1 lib/eucalypt/eucalypt-core/templates/eucalypt/config/manifest.rb
eucalypt-0.1.0 lib/eucalypt/eucalypt-core/templates/eucalypt/config/manifest.rb