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.
848 849 850 851 852 853 854 855 856 857 |
# File 'lib/opl.rb', line 848 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.
846 847 848 |
# File 'lib/opl.rb', line 846 def array_dimension @array_dimension end |
#name ⇒ Object
Returns the value of attribute name.
843 844 845 |
# File 'lib/opl.rb', line 843 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
844 845 846 |
# File 'lib/opl.rb', line 844 def value @value end |
#value_type ⇒ Object
number, array
845 846 847 |
# File 'lib/opl.rb', line 845 def value_type @value_type end |