Sha256: 9da9d33601c30149fe1ee213df169e1812448e8b6553ab6da95ace0e9896e11d

Contents?: true

Size: 746 Bytes

Versions: 25

Compression:

Stored size: 746 Bytes

Contents

# encoding: utf-8
module Sinatra
  module AlertHelper
    extend Hexacta

    def info_alert(option_hash)
      slim "#{Hexacta::GEM_FILE_DIR}/alerts/info".to_sym, locals: option_hash
    end

    def empty_alert(option_hash)
      slim "#{Hexacta::GEM_FILE_DIR}/alerts/empty".to_sym, locals: option_hash
    end

    def warning_alert(option_hash)
      slim "#{Hexacta::GEM_FILE_DIR}/alerts/warning".to_sym, locals: option_hash
    end

    def error_alert(option_hash)
      slim "#{Hexacta::GEM_FILE_DIR}/alerts/error".to_sym, locals: option_hash
    end

    setup_dir("/app/views/#{Hexacta::GEM_FILE_DIR}/alerts")
    copy_all_files("/lib/sinatra/views/alerts","/app/views/#{Hexacta::GEM_FILE_DIR}/alerts")
  end

  helpers AlertHelper
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
sinatra-hexacta-0.6.1 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.6.0 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.5.1 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.5.0 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.4.3 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.4.2 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.4.1 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.4.0 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.18 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.17 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.16 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.15 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.14 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.13 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.12 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.11 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.10 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.9 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.8 lib/sinatra/helpers/alerts.rb
sinatra-hexacta-0.3.7 lib/sinatra/helpers/alerts.rb