Class: Dto::Infra::SubnetEntityPayload
- Inherits:
-
Object
- Object
- Dto::Infra::SubnetEntityPayload
- Defined in:
- lib/dto/infra/subnet_entity_payload.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, id) ⇒ SubnetEntityPayload
constructor
A new instance of SubnetEntityPayload.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, id) ⇒ SubnetEntityPayload
Returns a new instance of SubnetEntityPayload.
9 10 11 12 |
# File 'lib/dto/infra/subnet_entity_payload.rb', line 9 def initialize(name, id) @name = name @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/dto/infra/subnet_entity_payload.rb', line 7 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/dto/infra/subnet_entity_payload.rb', line 7 def name @name end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 |
# File 'lib/dto/infra/subnet_entity_payload.rb', line 14 def to_hash { name: @name, id: @id }.compact end |