Class: Web::SimpleDispatcher::Link
- Defined in:
- lib/web/simpledispatcher.rb
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Class Method Summary collapse
Instance Method Summary collapse
- #encode ⇒ Object
- #get_link ⇒ Object
-
#initialize(page, query) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(page, query) ⇒ Link
Returns a new instance of Link.
29 30 31 32 |
# File 'lib/web/simpledispatcher.rb', line 29 def initialize page, query @page = page @query = query end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
27 28 29 |
# File 'lib/web/simpledispatcher.rb', line 27 def page @page end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
27 28 29 |
# File 'lib/web/simpledispatcher.rb', line 27 def query @query end |
Class Method Details
Instance Method Details
#encode ⇒ Object
38 39 40 |
# File 'lib/web/simpledispatcher.rb', line 38 def encode encode64(Marshal.dump(self)) end |
#get_link ⇒ Object
34 35 36 |
# File 'lib/web/simpledispatcher.rb', line 34 def get_link "#{SimpleDispatcher.template_from_class(@page)}?#{Link.make_query_string(Web.encode_objects(@query))}" end |