Class: PuppetX::Puppetlabs::Migration::OverviewModel::LogIssue

Inherits:
NamedEntity show all
Defined in:
lib/puppet_x/puppetlabs/migration/overview_model.rb

Instance Attribute Summary collapse

Attributes inherited from NamedEntity

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NamedEntity

#<=>

Methods inherited from Entity

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

Methods included from ModelObject

#initialize_from_hash, #to_hash

Constructor Details

#initialize(id, issue, level_id) ⇒ LogIssue

Returns a new instance of LogIssue.



337
338
339
340
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 337

def initialize(id, issue, level_id)
  super(id, issue)
  @level_id = level_id
end

Instance Attribute Details

#level_idObject (readonly)

Returns the value of attribute level_id.



335
336
337
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 335

def level_id
  @level_id
end

Class Method Details

.many_rels_hashObject



349
350
351
352
353
354
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 349

def self.many_rels_hash
  {
    :messages => LogMessage.instance_method(:issue_id),
    :log_entries => [LogMessage.instance_method(:issue_id), LogEntry.instance_method(:message_id) ]
  }
end

Instance Method Details

#one_relationship(name) ⇒ Object



342
343
344
345
346
347
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 342

def one_relationship(name)
  case name
  when :level
    level_id || UNDEFINED_ID
  end
end