Class: PuppetX::Puppetlabs::Migration::OverviewModel::LogEntry

Inherits:
Entity
  • Object
show all
Defined in:
lib/puppet_x/puppetlabs/migration/overview_model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#<=>, #eql?, from_hash, #hash, #id, init_relationships, many_relationship, #many_relationship, many_rels_hash, simple_name

Methods included from ModelObject

#initialize_from_hash, #to_hash

Constructor Details

#initialize(id, compilation_id, timestamp, message_id, location_id) ⇒ LogEntry

Returns a new instance of LogEntry.



387
388
389
390
391
392
393
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 387

def initialize(id, compilation_id, timestamp, message_id, location_id)
  super(id)
  @compilation_id = compilation_id
  @timestamp = timestamp
  @message_id = message_id
  @location_id = location_id
end

Instance Attribute Details

#compilation_idObject (readonly)

Returns the value of attribute compilation_id.



382
383
384
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 382

def compilation_id
  @compilation_id
end

#location_idObject (readonly)

Returns the value of attribute location_id.



383
384
385
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 383

def location_id
  @location_id
end

#message_idObject (readonly)

Returns the value of attribute message_id.



384
385
386
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 384

def message_id
  @message_id
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



385
386
387
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 385

def timestamp
  @timestamp
end

Instance Method Details

#one_relationship(name) ⇒ Object



395
396
397
398
399
400
401
402
403
404
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 395

def one_relationship(name)
  case name
  when :compilation
    compilation_id || UNDEFINED_ID
  when :message
    message_id || UNDEFINED_ID
  when :location
    location_id || UNDEFINED_ID
  end
end