Class: Range

Inherits:
Object show all
Defined in:
lib/rant/import/var/numbers.rb

Overview

module Rant

Instance Method Summary collapse

Instance Method Details

#rant_constraintObject


106
107
108
109
110
111
112
113
114
115
# File 'lib/rant/import/var/numbers.rb', line 106

def rant_constraint
    case first
    when ::Integer
        Rant::RantVar::Constraints::IntegerInRange.new(self)
    when ::Float
        Rant::RantVar::Constraints::FloatInRange.new(self)
    else
        raise NotAConstraintFactoryError.new(self)
    end
end