Class: PuppetX::Puppetlabs::Migration::OverviewModel::NamedEntity Abstract
- Defined in:
- lib/puppet_x/puppetlabs/migration/overview_model.rb
Overview
This class is abstract.
An entity with a name
Direct Known Subclasses
Attribute, Environment, LogIssue, LogLevel, Node, Resource, ResourceType
Instance Attribute Summary collapse
- #name ⇒ Object readonly
Instance Method Summary collapse
- #<=>(o) ⇒ Object
-
#initialize(id, name) ⇒ NamedEntity
constructor
A new instance of NamedEntity.
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
#name ⇒ Object (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 |