Class: PuppetX::Puppetlabs::Migration::OverviewModel::NamedEntity Abstract

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

Overview

This class is abstract.

An entity with a name

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, #one_relationship, simple_name

Methods included from ModelObject

#initialize_from_hash, #to_hash

Constructor Details

#initialize(id, name) ⇒ NamedEntity

Returns a new instance of NamedEntity.



170
171
172
173
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 170

def initialize(id, name)
  super(id)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)



168
169
170
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 168

def name
  @name
end

Instance Method Details

#<=>(o) ⇒ Object



175
176
177
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 175

def <=>(o)
  o.is_a?(NamedEntity) ? @name <=> o.name : super
end