Class: DBD4::DatatypeDefinition

Inherits:
Array
  • Object
show all
Defined in:
lib/dbd4/dbd4_model_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(datatype) ⇒ DatatypeDefinition

Returns a new instance of DatatypeDefinition.



451
452
453
454
455
456
457
# File 'lib/dbd4/dbd4_model_file.rb', line 451

def initialize(datatype)
  @id = datatype.attributes['ID']
  @type = datatype.attributes['TypeName']
  datatype.elements.each("PARAMS/PARAM") do |p|
    self << p.attributes['Name']
  end
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



449
450
451
# File 'lib/dbd4/dbd4_model_file.rb', line 449

def id
  @id
end

#param_keysObject (readonly)

Returns the value of attribute param_keys.



449
450
451
# File 'lib/dbd4/dbd4_model_file.rb', line 449

def param_keys
  @param_keys
end

#typeObject (readonly)

Returns the value of attribute type.



449
450
451
# File 'lib/dbd4/dbd4_model_file.rb', line 449

def type
  @type
end

Instance Method Details

#to_strObject



459
460
461
# File 'lib/dbd4/dbd4_model_file.rb', line 459

def to_str
  "GeneralDataType(id=#{id}, type=#{type}, #{params})"
end