Module: Paramore::Int
- Defined in:
- lib/paramore/types.rb
Class Method Summary collapse
Class Method Details
.[](input) ⇒ Object
29 30 31 32 33 |
# File 'lib/paramore/types.rb', line 29 def [](input) raise ArgumentError, "#{input} is not an integer!" unless input.to_s.match?(/^-{0,1}\d*$/) input.to_i end |