Class: FocusedController::StubbedURL
- Inherits:
-
Object
- Object
- FocusedController::StubbedURL
- Defined in:
- lib/focused_controller/test_helper.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#helper_name ⇒ Object
readonly
Returns the value of attribute helper_name.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #delete ⇒ Object
-
#gsub ⇒ Object
Deals with _compute_redirect_to_location in action_controller/metal/redirecting (I don’t feel proud about this…).
-
#initialize(helper_name, args) ⇒ StubbedURL
constructor
A new instance of StubbedURL.
- #to_s ⇒ Object
Constructor Details
#initialize(helper_name, args) ⇒ StubbedURL
Returns a new instance of StubbedURL.
45 46 47 48 |
# File 'lib/focused_controller/test_helper.rb', line 45 def initialize(helper_name, args) @helper_name = helper_name.to_s @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
43 44 45 |
# File 'lib/focused_controller/test_helper.rb', line 43 def args @args end |
#helper_name ⇒ Object (readonly)
Returns the value of attribute helper_name.
43 44 45 |
# File 'lib/focused_controller/test_helper.rb', line 43 def helper_name @helper_name end |
Instance Method Details
#==(other) ⇒ Object
50 51 52 53 54 |
# File 'lib/focused_controller/test_helper.rb', line 50 def ==(other) other.is_a?(self.class) && helper_name == other.helper_name && args == other.args end |
#delete ⇒ Object
62 63 64 |
# File 'lib/focused_controller/test_helper.rb', line 62 def delete(*) self end |
#gsub ⇒ Object
Deals with _compute_redirect_to_location in action_controller/metal/redirecting (I don’t feel proud about this…)
58 59 60 |
# File 'lib/focused_controller/test_helper.rb', line 58 def gsub(*) self end |
#to_s ⇒ Object
66 67 68 |
# File 'lib/focused_controller/test_helper.rb', line 66 def to_s "#{helper_name}(#{args.each(&:to_s).join(', ')})" end |