class Randrizer::Types::OneOf
Public Class Methods
new(list_def)
click to toggle source
# File lib/randrizer/types/one_of.rb, line 8 def initialize(list_def) @list_def = list_def end
Public Instance Methods
eval()
click to toggle source
# File lib/randrizer/types/one_of.rb, line 16 def eval @list_def.sample.eval end
length()
click to toggle source
# File lib/randrizer/types/one_of.rb, line 20 def length @list_def.length end
Also aliased as: count
validate!()
click to toggle source
# File lib/randrizer/types/one_of.rb, line 12 def validate! !@list_def.nil? end