Class: OPL::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/opl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_dimensionObject

Returns the value of attribute array_dimension.



846
847
848
# File 'lib/opl.rb', line 846

def array_dimension
  @array_dimension
end

#nameObject

Returns the value of attribute name.



843
844
845
# File 'lib/opl.rb', line 843

def name
  @name
end

#valueObject

Returns the value of attribute value.



844
845
846
# File 'lib/opl.rb', line 844

def value
  @value
end

#value_typeObject

number, array



845
846
847
# File 'lib/opl.rb', line 845

def value_type
  @value_type
end