Class: Redirect::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/redirect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(catch_url, redirect_url, options = {}) ⇒ Data

Returns a new instance of Data.



37
38
39
40
41
42
# File 'lib/redirect.rb', line 37

def initialize(catch_url, redirect_url, options = {})
  @catch_url = catch_url
  @redirect_url = redirect_url
  @code = options[:code] || Redirect.default_code
  @name = options[:name]
end

Instance Attribute Details

#catch_urlObject (readonly)

Returns the value of attribute catch_url.



36
37
38
# File 'lib/redirect.rb', line 36

def catch_url
  @catch_url
end

#codeObject (readonly)

Returns the value of attribute code.



36
37
38
# File 'lib/redirect.rb', line 36

def code
  @code
end

#nameObject (readonly)

Returns the value of attribute name.



36
37
38
# File 'lib/redirect.rb', line 36

def name
  @name
end

#redirect_urlObject (readonly)

Returns the value of attribute redirect_url.



36
37
38
# File 'lib/redirect.rb', line 36

def redirect_url
  @redirect_url
end