Module: CLOptions::Adapters
- Included in:
- CLOptions
- Defined in:
- lib/cloptions/adapters.rb
Constant Summary collapse
- Integer =
Kernel.method(:Integer)
- Octal =
proc { |value| raise ArgumentError, "Not Octal" unless value =~ /\A(-?)([0-7]+)\z/ Integer("#{$1}0#{$2}") }
- Hex =
proc { |value| raise ArgumentError, "Not Hex" unless value =~ /\A(-?)(?:0[Xx])?([\dA-Fa-f]+)\z/ Integer("#{$1}0x#{$2}") }
- Float =
Kernel.method(:Float)
- String =
proc { |value| value }