class Xcflushd::GLIHelpers::PositiveMinMaxInt
Constants
- POSITIVE_MIN_MAX_RE
this allows 0 or more as MIN, 1 or more as MAX
Attributes
max[R]
min[R]
Public Class Methods
match(str)
click to toggle source
# File lib/xcflushd/gli_helpers.rb, line 13 def self.match(str) md = POSITIVE_MIN_MAX_RE.match str return false if md.nil? min, max = [md[:min].to_i, md[:max].to_i] return false if max < min new min, max end
new(min, max)
click to toggle source
# File lib/xcflushd/gli_helpers.rb, line 23 def initialize(min, max) @min, @max = min, max end
Public Instance Methods
to_a()
click to toggle source
# File lib/xcflushd/gli_helpers.rb, line 27 def to_a [self] end