Class: OPL::Data
- Inherits:
-
Object
- Object
- OPL::Data
- Defined in:
- lib/opl.rb
Instance Attribute Summary collapse
-
#array_dimension ⇒ Object
Returns the value of attribute array_dimension.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
-
#value_type ⇒ Object
number, array.
Instance Method Summary collapse
-
#initialize(name, value) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(name, value) ⇒ Data
Returns a new instance of Data.
877 878 879 880 881 882 883 884 885 886 |
# File 'lib/opl.rb', line 877 def initialize(name, value) @name = name @value = value if value.is_a?(Array) @value_type = Array @array_dimension = value.dimension else @value_type = Integer end end |
Instance Attribute Details
#array_dimension ⇒ Object
Returns the value of attribute array_dimension.
875 876 877 |
# File 'lib/opl.rb', line 875 def array_dimension @array_dimension end |
#name ⇒ Object
Returns the value of attribute name.
872 873 874 |
# File 'lib/opl.rb', line 872 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
873 874 875 |
# File 'lib/opl.rb', line 873 def value @value end |
#value_type ⇒ Object
number, array
874 875 876 |
# File 'lib/opl.rb', line 874 def value_type @value_type end |