Class: PuppetX::Puppetlabs::Migration::OverviewModel::Resource
- Inherits:
-
NamedEntity
- Object
- Entity
- NamedEntity
- PuppetX::Puppetlabs::Migration::OverviewModel::Resource
- Defined in:
- lib/puppet_x/puppetlabs/migration/overview_model.rb
Instance Attribute Summary collapse
- #resource_type_id ⇒ Object readonly
Attributes inherited from NamedEntity
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, title, resource_type_id) ⇒ Resource
constructor
A new instance of Resource.
- #one_relationship(name) ⇒ Object
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, title, resource_type_id) ⇒ Resource
Returns a new instance of Resource.
411 412 413 414 |
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 411 def initialize(id, title, resource_type_id) super(id, title) @resource_type_id = resource_type_id end |
Instance Attribute Details
#resource_type_id ⇒ Object (readonly)
409 410 411 |
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 409 def resource_type_id @resource_type_id end |
Class Method Details
.many_rels_hash ⇒ Object
423 424 425 426 427 428 429 |
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 423 def self.many_rels_hash { :source_edges => EdgeIssue.instance_method(:source_id), :target_edges => EdgeIssue.instance_method(:target_id), :issues => ResourceIssue.instance_method(:resource_id) } end |
Instance Method Details
#one_relationship(name) ⇒ Object
416 417 418 419 420 421 |
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 416 def one_relationship(name) case name when :resource_type, :type resource_type_id || UNDEFINED_ID end end |