Class: Fog::Vcloud::MockDataClasses::MockPublicIpInternetServiceNodes

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/vcloud/mock_data_classes.rb

Instance Method Summary collapse

Methods inherited from Base

#_parent, base_url, #base_url, base_url=, #first, #initialize, #inspect, #last

Constructor Details

This class inherits a constructor from Fog::Vcloud::MockDataClasses::Base

Instance Method Details

#hrefObject



724
725
726
# File 'lib/fog/vcloud/mock_data_classes.rb', line 724

def href
  _parent.href + "/nodeServices"
end

#itemsObject



728
729
730
731
732
733
734
735
736
737
# File 'lib/fog/vcloud/mock_data_classes.rb', line 728

def items
  @items ||= [].tap do |node_array|
    node_array.instance_variable_set("@default_port", _parent.port)

    def node_array.<<(node)
      node[:port] ||= @default_port
      super
    end
  end
end