Module: AwsExtensions::EC2::Subnet
- Defined in:
- lib/aws_extensions/ec2/Subnet.rb
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Implement comparison by using subnet id.
-
#name ⇒ Object
Public: Returns the value of the “Name” tag for the subnet or nil if there is not one.
-
#vpc_subnet_name ⇒ Object
Public: Returns the name of the security group prefixed by the vpc name or id.
Instance Method Details
#<=>(other) ⇒ Object
Implement comparison by using subnet id
22 23 24 |
# File 'lib/aws_extensions/ec2/Subnet.rb', line 22 def <=>(other) self.subnet_id <=> other.subnet_id end |
#name ⇒ Object
Public: Returns the value of the “Name” tag for the subnet or nil if there is not one
8 9 10 11 12 |
# File 'lib/aws_extensions/ec2/Subnet.rb', line 8 def name self..select { |tag| tag.key == "Name" }.first.value rescue nil end |