class Mobi::Mtld::Da::PropertyName

Copyright
Author

Contains a property name and the expected data type of values associated with this name.

Attributes

data_type_id[R]
name[R]

Public Class Methods

new(name, data_type_id) click to toggle source

Create a new PropertyName with a name and the expected data type of value assigned to it.

# File ../../device_api/trunk/ruby/src/lib/property_name.rb, line 26
def initialize name, data_type_id
        @name = name
        @data_type_id = data_type_id
end

Public Instance Methods

==(property) click to toggle source

Compare two instances of this class. If both have equal values and data type then returns true.

return

Boolean value based on whether both objects are equal or not.

# File ../../device_api/trunk/ruby/src/lib/property_name.rb, line 44
def ==(property)
        if property.nil? || !property.kind_of?(PropertyName) || 
                        @data_type != property.data_type || @value != property.value
                return false
        end
        return true
end
data_type() click to toggle source

Get the data type name of this PropertyName object.

# File ../../device_api/trunk/ruby/src/lib/property_name.rb, line 32
def data_type
        return DataType.name @data_type_id
end
to_s() click to toggle source

Returns the property data type id wrapped by breaks.

# File ../../device_api/trunk/ruby/src/lib/property_name.rb, line 37
def to_s
        return "(" << @data_type_id << ")"
end