Method: BCDice::Normalize.comparison_operator
- Defined in:
- lib/bcdice/normalize.rb
.comparison_operator(op) ⇒ Symbol?
比較演算子をシンボルに正規化する
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/bcdice/normalize.rb', line 11 def comparison_operator(op) case op when /<=|=</ :<= when />=|=>/ :>= when /<>|!=|=!/ :'!=' when /</ :< when />/ :> when /=/ :== end end |