Class Range
In: lib/core_ex.rb
lib/core_ex/yaml.rb
Parent: Object

Methods

size   yaml_new  

External Aliases

yaml_new -> yaml_new_no_eval

Public Class methods

[Source]

# 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

Public Instance methods

[Source]

# File lib/core_ex.rb, line 346
  def size
   (max.to_i - min.to_i).abs
  end

[Validate]