lib/galakei/helper_methods.rb in galakei-0.13.0 vs lib/galakei/helper_methods.rb in galakei-0.13.1
- old
+ new
@@ -1,16 +1,20 @@
module Galakei
module HelperMethods
- def self.included(klass)
+ def self.included(klass) # :nodoc:
klass.helper_method :galakei?
klass.helper_method :emoji_table
end
- protected
+ # Does the current request come from a galakei?
def galakei?
request.galakei?
end
+ # Returns the carrier specific {Emoji}[http://www.keitai-dev.net/Emoji]. Falls back to Unicode
+ # emoji.
+ #
+ # emoji_table.white_smiling_face # "☺"
def emoji_table
if request.docomo?
EmojiTable.docomo
elsif request.softbank?
EmojiTable.softbank