class RoughSwal::Preset

Public Class Methods

call(name, &block) click to toggle source
# File lib/rough_swal.rb, line 114
def call(name, &block)
  @preset ||= {}
  @preset[name] = Default.new.tap do |preset|
    preset.instance_eval(&block)
  end
end
find(name) click to toggle source
# File lib/rough_swal.rb, line 122
def find(name)
  @preset[name].try(:params) || (raise NotFound)
end