Module: Cabin::Mixins::CAPSLOCK

Defined in:
lib/cabin/mixins/CAPSLOCK.rb

Overview

ALL CAPS MEANS SERIOUS BUSINESS

Class Method Summary collapse

Class Method Details

.extended(instance) ⇒ Object



5
6
7
# File 'lib/cabin/mixins/CAPSLOCK.rb', line 5

def self.extended(instance)
  self.included(instance.class)
end

.included(klass) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/cabin/mixins/CAPSLOCK.rb', line 8

def self.included(klass)
  klass.filter do |event|
    # CAPITALIZE ALL THE STRINGS
    event.each do |key, value|
      event[key] = value.upcase if value.respond_to?(:upcase)
    end
  end
end