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.



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_dimensionObject

Returns the value of attribute array_dimension.



875
876
877
# File 'lib/opl.rb', line 875

def array_dimension
  @array_dimension
end

#nameObject

Returns the value of attribute name.



872
873
874
# File 'lib/opl.rb', line 872

def name
  @name
end

#valueObject

Returns the value of attribute value.



873
874
875
# File 'lib/opl.rb', line 873

def value
  @value
end

#value_typeObject

number, array



874
875
876
# File 'lib/opl.rb', line 874

def value_type
  @value_type
end