Class: Cumulus::Route53::Vpc

Inherits:
Struct
  • Object
show all
Defined in:
lib/route53/models/Vpc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



3
4
5
# File 'lib/route53/models/Vpc.rb', line 3

def id
  @id
end

#regionObject

Returns the value of attribute region

Returns:

  • (Object)

    the current value of region



3
4
5
# File 'lib/route53/models/Vpc.rb', line 3

def region
  @region
end

Instance Method Details

#<=>(other) ⇒ Object

Public: Implement <=> to allow sorting. Sorts by id and then region



5
6
7
8
9
10
11
# File 'lib/route53/models/Vpc.rb', line 5

def <=>(other)
  if self.id == other.id
    self.region <=> other.region
  else
    self.id <=> self.id
  end
end

#to_hashObject

Public: Produce a hash representing the VPC

Returns the hash



16
17
18
19
20
21
# File 'lib/route53/models/Vpc.rb', line 16

def to_hash
  {
    "id" => id,
    "region" => region
  }
end