Class: MML::CreatorInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ CreatorInfo

Returns a new instance of CreatorInfo.



280
281
282
283
# File 'lib/mml/common.rb', line 280

def initialize(args = {})
  self.personalizedInfo = args[:personalizedInfo]
  self.creatorLicense = args[:creatorLicense]
end

Instance Attribute Details

#creatorLicenseObject

Returns the value of attribute creatorLicense.



278
279
280
# File 'lib/mml/common.rb', line 278

def creatorLicense
  @creatorLicense
end

#personalizedInfoObject

Returns the value of attribute personalizedInfo.



278
279
280
# File 'lib/mml/common.rb', line 278

def personalizedInfo
  @personalizedInfo
end

Instance Method Details

#to_xmlObject



295
296
297
298
299
300
301
302
303
304
# File 'lib/mml/common.rb', line 295

def to_xml
  xb= Builder::XmlMarkup.new
  xb.mmlCi :CreatorInfo do
    xb << personalizedInfo.to_xml
    creatorLicense.each do |license|
      attributes = {'mmlCi:tableId' => license.tableId} if license.tableId
      xb.mmlCi :creatorLicense, license.value, attributes
    end
  end
end