Project

pokebell

0.0
No commit activity in last 3 years
No release in over 3 years
Japanese charactor displayed by hiragana, alphabet, or number encode to 2-digit in used "Pokebell" pager.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 2.0.1
~> 3.12
~> 2.8.0

Runtime

= 1.6
 Project Readme

pokebell

This gem is convert from Japanese message written by Hiragana / Katakana / alphabet / digit to Japanese pager aka "Pokebell" 2-digits format codes, and from the code to Katakana message.

usage

pokeberu = Pokebell.new("ぽけべる")
pokeberu.pokebell #=> "650524640493"
pokeberu.code     #=> "650524640493"
pokeberu.str      #=> "ポケベル"
pokeberu.to_s     #=> "ポケベル"
pokeberu = Pokebell.number("650524640493")
pokeberu.pokebell #=> "650524640493"
pokeberu.code     #=> "650524640493"
pokeberu.str      #=> "ポケベル"
pokeberu.to_s     #=> "ポケベル"

convert table

Pokebell.new("あいうえお").pokebell #=> "1112131415"
Pokebell.new("かきくけこ").pokebell #=> "2122232425"
Pokebell.new("さしすせそ").pokebell #=> "3132333435"
Pokebell.new("たちつてと").pokebell #=> "4142434445"
Pokebell.new("なにぬねの").pokebell #=> "5152535455"
Pokebell.new("はひふへほ").pokebell #=> "6162636465"
Pokebell.new("まみむめも").pokebell #=> "7172737475"
Pokebell.new("やゆよ").pokebell     #=> "818385"
Pokebell.new("()").pokebell       #=> "8284"
Pokebell.new("らりるれろ").pokebell #=> "9192939495"
Pokebell.new("わをん").pokebell     #=> "010203"
Pokebell.new("゛゜").pokebell       #=> "0405"

Pokebell.new("ABCDE").pokebell #=> "1617181910"
Pokebell.new("FGHIJ").pokebell #=> "2627282920"
Pokebell.new("KLMNO").pokebell #=> "3637383930"
Pokebell.new("PQRST").pokebell #=> "4647484940"
Pokebell.new("UVWXY").pokebell #=> "5657585950"
Pokebell.new("Z?!ー/").pokebell #=> "6667686960"
Pokebell.new("¥&").pokebell       #=> "7677"
Pokebell.new("*# ").pokebell     #=> "868788"
Pokebell.new("12345").pokebell #=> "9697989990"
Pokebell.new("67890").pokebell #=> "0607080900"

example

Pokebell.new("ぱーる").pokebell #=> "61056993"
Pokebell.new("パール").pokebell #=> "61056993"
Pokebell.new("るびー").pokebell #=> "93620469"
Pokebell.new("ルビー").pokebell #=> "93620469"

Pokebell.new("perl").pokebell   #=> "46104837"
Pokebell.new("ruby").pokebell   #=> "48561750"
Pokebell.new("hello pokebell").pokebell
#=> "2810373730884630361017103737"
Pokebell.number("61056993").str #=> "パール"
Pokebell.number("93620469").str #=> "ルビー"
Pokebell.number("46104837").str #=> "PERL"
Pokebell.number("48561750").str #=> "RUBY"
Pokebell.number("2810373730884630361017103737").str
#=> "HELLO POKEBELL"

##TODO

  • RSpec
  • Emoji (Clock="78", Phone="79", Cup="70", Heart="89")

Contributing to pokebell

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2014 riocampos. See LICENSE.txt for further details.