Class: Trample::Page
- Inherits:
-
Object
- Object
- Trample::Page
- Defined in:
- lib/trample/page.rb
Instance Attribute Summary collapse
-
#request_method ⇒ Object
readonly
Returns the value of attribute request_method.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(request_method, url, parameters = {}) ⇒ Page
constructor
A new instance of Page.
- #parameters ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_method, url, parameters = {}) ⇒ Page
Returns a new instance of Page.
5 6 7 8 9 |
# File 'lib/trample/page.rb', line 5 def initialize(request_method, url, parameters = {}) @request_method = request_method @url = url @parameters = parameters end |
Instance Attribute Details
#request_method ⇒ Object (readonly)
Returns the value of attribute request_method.
3 4 5 |
# File 'lib/trample/page.rb', line 3 def request_method @request_method end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/trample/page.rb', line 15 def ==(other) other.is_a?(Page) && other.request_method == request_method && other.url == url end |
#parameters ⇒ Object
11 12 13 |
# File 'lib/trample/page.rb', line 11 def parameters proc_params? ? @parameters.call : @parameters end |
#url ⇒ Object
21 22 23 |
# File 'lib/trample/page.rb', line 21 def url proc_params? ? interpolated_url : @url end |