Module: EmojiLog

Defined in:
lib/emoji_log.rb,
lib/emoji_log/railtie.rb,
lib/emoji_log/version.rb

Defined Under Namespace

Classes: ActionController, Railtie

Constant Summary collapse

VERSION =
'0.1.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.averageObject

Returns the value of attribute average.



25
26
27
# File 'lib/emoji_log.rb', line 25

def average
  @average
end

.average_thresholdObject

Returns the value of attribute average_threshold.



25
26
27
# File 'lib/emoji_log.rb', line 25

def average_threshold
  @average_threshold
end

.badObject

Returns the value of attribute bad.



25
26
27
# File 'lib/emoji_log.rb', line 25

def bad
  @bad
end

.cancelledObject

Returns the value of attribute cancelled.



25
26
27
# File 'lib/emoji_log.rb', line 25

def cancelled
  @cancelled
end

.errorObject

Returns the value of attribute error.



25
26
27
# File 'lib/emoji_log.rb', line 25

def error
  @error
end

.fastObject

Returns the value of attribute fast.



25
26
27
# File 'lib/emoji_log.rb', line 25

def fast
  @fast
end

.fast_thresholdObject

Returns the value of attribute fast_threshold.



25
26
27
# File 'lib/emoji_log.rb', line 25

def fast_threshold
  @fast_threshold
end

.infoObject

Returns the value of attribute info.



25
26
27
# File 'lib/emoji_log.rb', line 25

def info
  @info
end

.redirectObject

Returns the value of attribute redirect.



25
26
27
# File 'lib/emoji_log.rb', line 25

def redirect
  @redirect
end

.slowObject

Returns the value of attribute slow.



25
26
27
# File 'lib/emoji_log.rb', line 25

def slow
  @slow
end

.slow_thresholdObject

Returns the value of attribute slow_threshold.



25
26
27
# File 'lib/emoji_log.rb', line 25

def slow_threshold
  @slow_threshold
end

.successObject

Returns the value of attribute success.



25
26
27
# File 'lib/emoji_log.rb', line 25

def success
  @success
end

Class Method Details

.setup(app) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/emoji_log.rb', line 5

def self.setup(app)
  # self.application = app
  EmojiLog.slow = "🐢"
  EmojiLog.average = "🐇"
  EmojiLog.fast = "🚀"
  EmojiLog.slow_threshold = 1000
  EmojiLog.average_threshold = 500
  EmojiLog.fast_threshold = 150

  EmojiLog.info = "🧠"
  EmojiLog.success = ""
  EmojiLog.redirect = "🔁"
  EmojiLog.bad = ""
  EmojiLog.error = "🔥"
  EmojiLog.cancelled = ""

  ::EmojiLog::ActionController.attach_to :action_controller
end