Module: Galakei::HelperMethods
- Defined in:
- lib/galakei/helper_methods.rb
Class Method Summary collapse
-
.included(klass) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#emoji_table ⇒ Object
Returns the carrier specific Emoji.
-
#galakei? ⇒ Boolean
Does the current request come from a galakei?.
Class Method Details
.included(klass) ⇒ Object
:nodoc:
3 4 5 6 |
# File 'lib/galakei/helper_methods.rb', line 3 def self.included(klass) # :nodoc: klass.helper_method :galakei? klass.helper_method :emoji_table end |
Instance Method Details
#emoji_table ⇒ Object
Returns the carrier specific Emoji. Falls back to Unicode emoji.
emoji_table.white_smiling_face # "☺"
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/galakei/helper_methods.rb', line 17 def emoji_table if request.docomo? EmojiTable.docomo elsif request.softbank? EmojiTable.softbank elsif request.au? EmojiTable.au else EmojiTable.unicode end end |
#galakei? ⇒ Boolean
Does the current request come from a galakei?
9 10 11 |
# File 'lib/galakei/helper_methods.rb', line 9 def galakei? request.galakei? end |