Class: Middleman::Sitemap::Extensions::Proxies::ProxyConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-core/sitemap/extensions/proxies.rb

Overview

Configuration for a proxy instance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ProxyConfiguration

Create a new proxy configuration from hash options



145
146
147
148
149
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 145

def initialize(options={})
  options.each do |key, value|
    send "#{key}=", value
  end
end

Instance Attribute Details

#metadataObject

Additional metadata like blocks and locals to apply to the proxy



142
143
144
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 142

def 
  @metadata
end

#pathObject

The path that this proxy will appear at in the sitemap



130
131
132
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 130

def path
  @path
end

#targetObject

The existing sitemap path that this will proxy to



136
137
138
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 136

def target
  @target
end

Instance Method Details

#eql?(other) ⇒ Boolean

Two configurations are equal if they reference the same path

Returns:

  • (Boolean)


152
153
154
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 152

def eql?(other)
  other.path == path
end

#hashObject

Two configurations are equal if they reference the same path



157
158
159
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 157

def hash
  path.hash
end