Class: Redirect::Data
- Inherits:
-
Object
- Object
- Redirect::Data
- Defined in:
- lib/redirect.rb
Instance Attribute Summary collapse
-
#catch_url ⇒ Object
readonly
Returns the value of attribute catch_url.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#redirect_url ⇒ Object
readonly
Returns the value of attribute redirect_url.
Instance Method Summary collapse
-
#initialize(catch_url, redirect_url, options = {}) ⇒ Data
constructor
A new instance of Data.
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, = {}) @catch_url = catch_url @redirect_url = redirect_url @code = [:code] || Redirect.default_code @name = [:name] end |
Instance Attribute Details
#catch_url ⇒ Object (readonly)
Returns the value of attribute catch_url.
36 37 38 |
# File 'lib/redirect.rb', line 36 def catch_url @catch_url end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
36 37 38 |
# File 'lib/redirect.rb', line 36 def code @code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/redirect.rb', line 36 def name @name end |
#redirect_url ⇒ Object (readonly)
Returns the value of attribute redirect_url.
36 37 38 |
# File 'lib/redirect.rb', line 36 def redirect_url @redirect_url end |