class Digiproc::DataProperties::Slope::Negative

Used in the Slope class to indicate a negative slope.

Made for easy syntax purposes

Public Class Methods

==(val) click to toggle source

Can test equality in multiple ways:

Digiproc::DataProperties::Slope::Negative == OpenStruct.new(type: :negative) # true
Digiproc::DataProperties::Slope::Negative == :negative # true
Digiproc::DataProperties::Slope::Negative == "negative" # true
# File lib/concerns/data_properties.rb, line 131
def self.==(val)
    if val.respond_to? :type
        return true if val.type == :negative
    end
    return true if val == :negative
    if val.respond_to? :downcase
        return true if val.downcase == "negative"
    end
    false
end
is?(val) click to toggle source

Alias to == Can test equality in multiple ways:

Digiproc::DataProperties::Slope::Negative.is? OpenStruct.new(type: :negative) # true
Digiproc::DataProperties::Slope::Negative.is? :negative # true
Digiproc::DataProperties::Slope::Negative.is? "negative" # true, not case sensitive
# File lib/concerns/data_properties.rb, line 148
def self.is?(val)
    self.==(val)
end
type() click to toggle source

Used for comparison in == returns :negative

# File lib/concerns/data_properties.rb, line 122
def self.type
    :negative
end