module Confetti

Public Class Methods

exploding(attrs = {}) click to toggle source

Exploding Confetti

# File lib/confetti.rb, line 11
def self.exploding(attrs = {})
  @attributes = Confetti.attributes(attrs)
  Funfetti::ConfettiCell.(@attributes).(:exploding)
end
falling(attrs = {}) click to toggle source

Falling Confetti

# File lib/confetti.rb, line 5
def self.falling(attrs = {})
  @attributes = Confetti.attributes(attrs)
  Funfetti::ConfettiCell.(@attributes).(:falling)
end

Private Class Methods

attributes(attrs) click to toggle source
# File lib/confetti.rb, line 18
def self.attributes(attrs)
  attribute_list = {
    text: attrs[:text] || "Celebrate!",
    classes: attrs[:classes] || "",
    ids: attrs[:ids] || ""
  }
end