Class: Pendulum::Command::Apply::ResultURL

Inherits:
Object
  • Object
show all
Defined in:
lib/pendulum/command/apply/result_url.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, from, to) ⇒ ResultURL

Returns a new instance of ResultURL.



5
6
7
8
9
# File 'lib/pendulum/command/apply/result_url.rb', line 5

def initialize(client, from, to)
  self.client = client
  self.from   = from
  self.to     = to
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/pendulum/command/apply/result_url.rb', line 4

def client
  @client
end

#fromObject

Returns the value of attribute from.



4
5
6
# File 'lib/pendulum/command/apply/result_url.rb', line 4

def from
  @from
end

#toObject

Returns the value of attribute to.



4
5
6
# File 'lib/pendulum/command/apply/result_url.rb', line 4

def to
  @to
end

Instance Method Details

#changed?Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
# File 'lib/pendulum/command/apply/result_url.rb', line 11

def changed?
  from_uri = to_uri(from)
  to_uri   = mask(to_uri(to))

  uri_without_query(from_uri) != uri_without_query(to_uri) ||
    query_hash(from_uri) != query_hash(to_uri)
end