Class: Fog::Ecloud::MockDataClasses::MockPublicIpInternetServiceNodes

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/compute/ecloud.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::Ecloud::MockDataClasses::Base

Instance Method Details

#hrefObject



756
757
758
# File 'lib/fog/compute/ecloud.rb', line 756

def href
  _parent.href + "/nodeServices"
end

#itemsObject



760
761
762
763
764
765
766
767
768
769
# File 'lib/fog/compute/ecloud.rb', line 760

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