ãåç½®ããä»å¹´ã®æ±è²
ä»å¹´ããã¬ãªã1å¹´ã«ãããã¨æãã¾ãï¼
v0.2.1 ãªãªã¼ã¹ãã¼ã
rubicure (0.2.1): All about Japanese battle heroine "Pretty Cure (Precure)". http://t.co/okm25OWSUI
— RubyGems (@rubygems) January 18, 2015
https://github.com/sue445/rubicure
ãããã便å©ã¡ã½ããã追å ããã¾ãã
Rubicure::Girl#cast_nameã®è¿½å
Cure.peace.cast_name #=> "éå 寿å" pp Precure.all_stars.map{ |girl| [girl.precure_name, girl.cast_name] } [["ãã¥ã¢ãã©ãã¯", "æ¬åé½å"], ["ãã¥ã¢ãã¯ã¤ã", "ãããª"], ["ã·ã£ã¤ãã¼ã«ããã¹", "ç°ä¸çæµ"], ["ãã¥ã¢ãã«ã¼ã ", "樹å ãªãªã¨"], ["ãã¥ã¢ã¤ã¼ã°ã¬ãã", "æ¦æ¬æ¸©å"], ["ãã¥ã¢ããªã¼ã ", "ä¸ç¶ç±å¸å"], ["ãã¥ã¢ã«ã¼ã¸ã¥", "竹å é å"], ["ãã¥ã¢ã¬ã¢ãã¼ã", "ä¼ç¬èèä¹"], ["ãã¥ã¢ãã³ã", "æ°¸éæ"], ["ãã¥ã¢ã¢ã¯ã¢", "åç°æ"], ["ãã«ãã£ãã¼ãº", "ä»å°ã¨ãª"], ["ãã¥ã¢ãã¼ã", "æ²ä½³è"], ["ãã¥ã¢ããªã¼", "åå¤æè±æ¢¨"], ["ãã¥ã¢ãã¤ã³", "ä¸å·äºç´å"], ["ãã¥ã¢ããã·ã§ã³", "å°æ¾ç±ä½³"], ["ãã¥ã¢ããããµã ", "水樹å¥ã "], ["ãã¥ã¢ããªã³", "æ°´æ²¢å²çµµ"], ["ãã¥ã¢ãµã³ã·ã£ã¤ã³", "æ¡å³¶æ³å"], ["ãã¥ã¢ã ã¼ã³ã©ã¤ã", "ä¹ å·ç¶¾"], ["ãã¥ã¢ã¡ããã£", "å°æ¸ æ°´äºç¾"], ["ãã¥ã¢ãªãºã ", "æç¬ å¯ç¾å"], ["ãã¥ã¢ãã¼ã", "è±å£ããã¿"], ["ãã¥ã¢ãã¥ã¼ãº", "å¤§ä¹ ä¿ç ç¾"], ["ãã¥ã¢ãããã¼", "ç¦åç¾é"], ["ãã¥ã¢ãµãã¼", "ç°éã¢ãµã"], ["ãã¥ã¢ãã¼ã¹", "éå 寿å"], ["ãã¥ã¢ãã¼ã", "äºä¸éº»éå¥"], ["ãã¥ã¢ãã¥ã¼ãã£", "西æã¡ãªã¿"], ["ãã¥ã¢ãã¼ã", "ç天ç®ä»ç¾"], ["ãã¥ã¢ãã¤ã¤ã¢ã³ã", "寿ç¾èå"], ["ãã¥ã¢ãã¼ãã¿", "æ¸ä¸è"], ["ãã¥ã¢ã½ã¼ã", "å®®æ¬ä½³é£å"], ["ãã¥ã¢ã¨ã¼ã¹", "éå®®çæµ"], ["ãã¥ã¢ã©ããªã¼", "ä¸å³¶æ"], ["ãã¥ã¢ããªã³ã»ã¹", "æ½ããã¿"], ["ãã¥ã¢ããã¼", "åå·éå¥"], ["ãã¥ã¢ãã©ã¼ãã¥ã³", "æ¸æ¾é¥"]]
Rubicure::Girl#colorã®è¿½å
Cure.peace.color #=> "yellow" Cure.happy.color #=> "pink"
booleanå¤ãè¿ãã¡ã½ãããããã¾ã
# ãã¥ã¢ãã¼ã¹ã¯é»è²ãªã®ã§trueãè¿ã Cure.peace.yellow? #=> true # ãã¥ã¢ãã¼ã¹ã¯ãã³ã¯ã§ã¯ãªãã®ã§falseãè¿ã Cure.peace.pink? #=> false # ãã¥ã¢ãããã¼ã¯ãã³ã¯ãªã®ã§trueãè¿ã Cure.happy.pink? #=> true # æ¡ãã¥ã¢ã ãæ½åº Precure.all_stars.select(&:pink?).map(&:precure_name) #=> ["ãã¥ã¢ãã«ã¼ã ", "ãã¥ã¢ããªã¼ã ", "ãã¥ã¢ãã¼ã", "ãã¥ã¢ããããµã ", "ãã¥ã¢ã¡ããã£", "ãã¥ã¢ãããã¼", "ãã¥ã¢ãã¼ã", "ãã¥ã¢ã©ããªã¼"] # é»ãã¥ã¢ã ãæ½åº Precure.all_stars.select(&:yellow?).map(&:precure_name) #=> ["ã·ã£ã¤ãã¼ã«ããã¹", "ãã¥ã¢ã¬ã¢ãã¼ã", "ãã¥ã¢ãã¤ã³", "ãã¥ã¢ãµã³ã·ã£ã¤ã³", "ãã¥ã¢ãã¥ã¼ãº", "ãã¥ã¢ãã¼ã¹", "ãã¥ã¢ãã¼ãã¿", "ãã¥ã¢ããã¼"] # å®ç¾©ããã¦ããè²ã®ä¸è¦§ Rubicure::Girl.colors #=> [:black, :blue, :green, :pink, :purple, :red, :white, :yellow]
Rubicure::GirlãHashãç¶æ¿ããããã«ãªã£ã
Rubicure::Series
ãHashãç¶æ¿ã㦠Hashie::Extensions::MethodAccess ã使ã£ã¦ããã®ã«å¯¾ã㦠Rubicure::Girl
ããããããªãã£ãã®ã§åããã¾ããã
å é¨çã«ã¯çµæ§å¤æ´å ¥ã£ã¦ãã¾ããAPIçµç±ã§rubicureã使ã£ã¦ããéãã¯æ¯ãèãã«å¤æ´ã¯ããã¾ãã
詳ãããªãªã¼ã¹ãã¼ã
https://github.com/sue445/rubicure/blob/master/CHANGELOG.md#v021
ã1/19追è¨ã
rubicureãå©ç¨ãã¦ãã¹ããã¼ã¿ãä½æãã fake-precure ããªãªã¼ã¹ãã¦ãã¾ããï¼cast_name対å¿ï¼
faker-precure (0.0.3): Test data generator using precure http://t.co/0JcHHVVTYp
— RubyGems (@rubygems) January 18, 2015
https://github.com/sue445/faker-precure
ãã¡ããåããã¦ã©ããã
irb(main):002:0> 10.times{ puts Faker::Precure.cast_name } æ¬åé½å ä¸å³¶æ è±å£ãã㿠水樹å¥ã æ°´æ²¢å²çµµ ãããª å¤§ä¹ ä¿ç ç¾ ç¦åç¾é åå·éå¥ æ°¸éæ => 10
追伸
ãã³ã·ã§ã³ã§ãå£ã«å·ãã¤ããã«ãã¹ã¿ã¼ãè²¼ããã·ã¼ã«ãå¶ç¶è¦ã¤ãã¦è³¼å ¥ãã¾ããããã£ã¡ãã©ã¤ããã§ã³ã¸ã³ã°ã§ããï¼
3M ã³ãã³ã ã¿ã(ã¯ããã両é¢ç²ç) ãè²·ãå¾ãã㯠S 80æ CMR2-80
- åºç社/ã¡ã¼ã«ã¼: 3M(ã¹ãªã¼ã¨ã )
- ã¡ãã£ã¢: ãªãã£ã¹ç¨å
- è³¼å ¥: 2人 ã¯ãªãã¯: 7å
- ãã®ååãå«ãããã°ãè¦ã