Class: GoApiClient::Domain::InternalCache

Inherits:
Object
  • Object
show all
Defined in:
lib/go_api_client/domain/internal_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, options = {}) ⇒ InternalCache



6
7
8
9
# File 'lib/go_api_client/domain/internal_cache.rb', line 6

def initialize(uri, options = {})
  @uri = uri
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/go_api_client/domain/internal_cache.rb', line 4

def options
  @options
end

#uriObject

Returns the value of attribute uri.



4
5
6
# File 'lib/go_api_client/domain/internal_cache.rb', line 4

def uri
  @uri
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
# File 'lib/go_api_client/domain/internal_cache.rb', line 11

def ==(other)
  other && self.class.equal?(other.class) &&
      @uri == other.uri &&
      @options[:eager_parser] == other.options[:eager_parser]
end

#eql?(other) ⇒ Boolean



21
22
23
24
25
# File 'lib/go_api_client/domain/internal_cache.rb', line 21

def eql?(other)
  other && self.class.equal?(other.class) &&
      @uri.eql?(other.uri) &&
      @options[:eager_parser].eql?(other.options[:eager_parser])
end

#hashObject



17
18
19
# File 'lib/go_api_client/domain/internal_cache.rb', line 17

def hash
  @uri.hash ^ @options[:eager_parser].hash
end