class Mobi::Mtld::Da::Property

Copyright
Author

Contains a property value and data type id. The value can be fetched as a generic Object or one of the convenience to_X methods can be used to get the value in a specific type.

Attributes

data_type_id[R]
value[R]

Public Class Methods

new(value, data_type) click to toggle source

Creates a new Property with a value and data type

value

The value to store

data_type

Byte or char that represents the data type of the value to

store

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.

data_type() click to toggle source

Get data type name.

return

String with the data type name

to_b() click to toggle source

Get the value of the property as a boolean.

return

The TrueClass/FalseClass value of the property

to_i() click to toggle source

Get the value of the property as an integer.

return

The integer value of the property

to_s() click to toggle source

Get the value of the property as string. If a property has multiple possible values then the values are concatenated with a comma.

return

The string value of the property

to_set() click to toggle source

Gets a set of possible values for this property. This is typically only used when it is known that a given property name can have multiple possible values. All items in the set will have the same data type.

return

The array value of the property