Sha256: 3c6265243e814d39ae1b341d60097f7936610a284315df92903fd9eabdf290fc
Contents?: true
Size: 776 Bytes
Versions: 1
Compression:
Stored size: 776 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-bottom-right' @animation = 'bounce' @duration = 5000 @theme = 'light' @type = 'default' end def to_json { 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.0 | lib/rails_toastify.rb |