Sha256: 4fe42e047b5f5bdc1c51525412428d711d18ae21a9972d80f08973d27c163330
Contents?: true
Size: 770 Bytes
Versions: 1
Compression:
Stored size: 770 Bytes
Contents
# frozen_string_literal: true require_relative "rails_toastify/version" require_relative "rails_toastify/engine" module RailsToastify class << self attr_accessor :configuration end def self.setup self.configuration ||= Configuration.new yield(configuration) end class Configuration attr_accessor :position, :animation, :duration, :theme, :type def initialize @position = 'toast-container-top-right' @animation = 'bounce' @duration = 5000 @theme = 'light' @type = 'default' end def to_h { position: @position, animation: @animation, duration: @duration, theme: @theme, type: @type }.to_json end end class Error < StandardError; end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_toastify-1.1.1 | lib/rails_toastify.rb |