Class: CloudProviders::ElasticListener

Inherits:
Ec2Helper show all
Defined in:
lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb

Instance Attribute Summary

Attributes inherited from CloudProvider

#init_opts, #name

Instance Method Summary (collapse)

Methods inherited from Ec2Helper

#as, #ec2, #elb, #pool, property, #rds

Methods inherited from CloudProvider

#after_initialized, #bootstrap_nodes!, #default_keypair_path, default_keypair_path, #method_missing, #run

Constructor Details

- (ElasticListener) initialize(name, init_opts = {}, &block)



189
190
191
192
# File 'lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb', line 189

def initialize(name, init_opts={}, &block)
  set_vars_from_options(name)
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CloudProviders::CloudProvider

Instance Method Details

- (Object) diff(hsh = {})



198
199
200
201
202
# File 'lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb', line 198

def diff(hsh={})
  [:protocol, :load_balancer_port, :instance_port].reject do |k|
    hsh[k].to_s.capitalize == self.send(k).to_s.capitalize
  end
end

- (Object) to_hash



194
195
196
# File 'lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb', line 194

def to_hash
  {:protocol => protocol, :load_balancer_port => load_balancer_port.to_s, :instance_port => instance_port.to_s}
end