Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/fatty/core_ext/string.rb

Overview

These can be used to add "roles" to strings so that they can be styled according to the theme.

Instance Method Summary collapse

Instance Method Details

#fatty_errorObject



18
19
20
# File 'lib/fatty/core_ext/string.rb', line 18

def fatty_error
  { text: self, role: :error }
end

#fatty_goodObject



6
7
8
# File 'lib/fatty/core_ext/string.rb', line 6

def fatty_good
  { text: self, role: :good }
end

#fatty_infoObject



10
11
12
# File 'lib/fatty/core_ext/string.rb', line 10

def fatty_info
  { text: self, role: :info }
end

#fatty_warnObject



14
15
16
# File 'lib/fatty/core_ext/string.rb', line 14

def fatty_warn
  { text: self, role: :warn }
end