Class: BetterAuth::PluginContext
- Inherits:
-
Object
- Object
- BetterAuth::PluginContext
- Defined in:
- lib/better_auth/plugin_context.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#plugin ⇒ Object
readonly
Returns the value of attribute plugin.
Instance Method Summary collapse
- #apply!(attributes) ⇒ Object
-
#initialize(context, plugin = nil) ⇒ PluginContext
constructor
A new instance of PluginContext.
Constructor Details
#initialize(context, plugin = nil) ⇒ PluginContext
Returns a new instance of PluginContext.
7 8 9 10 |
# File 'lib/better_auth/plugin_context.rb', line 7 def initialize(context, plugin = nil) @context = context @plugin = plugin end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/better_auth/plugin_context.rb', line 5 def context @context end |
#plugin ⇒ Object (readonly)
Returns the value of attribute plugin.
5 6 7 |
# File 'lib/better_auth/plugin_context.rb', line 5 def plugin @plugin end |
Instance Method Details
#apply!(attributes) ⇒ Object
12 13 14 |
# File 'lib/better_auth/plugin_context.rb', line 12 def apply!(attributes) context.apply_plugin_context!(attributes || {}) end |