Class: Range
Overview
FIXME
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.yaml_new(klass, tag, val) ⇒ Object
126 127 128 129 130 131 132 133 134 |
# File 'lib/core_ex/yaml.rb', line 126 def yaml_new( klass, tag, val ) begin yaml_new_no_eval klass, tag, val rescue YAML::TypeError range = eval val.to_s raise unless range.is_a? Range range end end |
.yaml_new_no_eval ⇒ Object
125 |
# File 'lib/core_ex/yaml.rb', line 125 alias_method :yaml_new_no_eval, :yaml_new |
Instance Method Details
#size ⇒ Object
345 346 347 |
# File 'lib/core_ex.rb', line 345 def size (max.to_i - min.to_i).abs end |