Class: Sbmt::Strangler::Action
- Inherits:
-
Object
- Object
- Sbmt::Strangler::Action
- Extended by:
- Configurable
- Defined in:
- lib/sbmt/strangler/action.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #full_name ⇒ Object
- #http ⇒ Object
- #http_client ⇒ Object
-
#initialize(name, controller) {|_self| ... } ⇒ Action
constructor
A new instance of Action.
Methods included from Configurable
Constructor Details
#initialize(name, controller) {|_self| ... } ⇒ Action
Returns a new instance of Action.
17 18 19 20 21 22 |
# File 'lib/sbmt/strangler/action.rb', line 17 def initialize(name, controller, &) @name = name @controller = controller yield(self) end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
15 16 17 |
# File 'lib/sbmt/strangler/action.rb', line 15 def controller @controller end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/sbmt/strangler/action.rb', line 15 def name @name end |
Instance Method Details
#full_name ⇒ Object
24 25 26 |
# File 'lib/sbmt/strangler/action.rb', line 24 def full_name "#{controller.name}##{name}" end |
#http ⇒ Object
28 29 30 |
# File 'lib/sbmt/strangler/action.rb', line 28 def http @http ||= ActiveSupport::InheritableOptions.new(controller.http) end |