Class: Cul::Omniauth::AbilityProxy
- Inherits:
-
Object
- Object
- Cul::Omniauth::AbilityProxy
- Defined in:
- lib/cul/omniauth/ability_proxy.rb
Instance Attribute Summary collapse
-
#content_models ⇒ Object
Returns the value of attribute content_models.
-
#context ⇒ Object
Returns the value of attribute context.
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#user_roles ⇒ Object
Returns the value of attribute user_roles.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ AbilityProxy
constructor
A new instance of AbilityProxy.
- #to_h ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ AbilityProxy
Returns a new instance of AbilityProxy.
4 5 6 7 8 9 10 11 12 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 4 def initialize(opts = {}) self.mime_type = opts[:mime_type] self.context = opts[:context] self.content_models = opts[:content_models] || [] self.publisher = opts[:publisher] || [] self.remote_ip = opts[:remote_ip] || [] self.user_id = opts[:user_id] || [] self.user_roles = opts[:user_roles] || [] end |
Instance Attribute Details
#content_models ⇒ Object
Returns the value of attribute content_models.
3 4 5 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 3 def content_models @content_models end |
#context ⇒ Object
Returns the value of attribute context.
3 4 5 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 3 def context @context end |
#mime_type ⇒ Object
Returns the value of attribute mime_type.
3 4 5 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 3 def mime_type @mime_type end |
#publisher ⇒ Object
Returns the value of attribute publisher.
3 4 5 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 3 def publisher @publisher end |
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
3 4 5 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 3 def remote_ip @remote_ip end |
#user_id ⇒ Object
Returns the value of attribute user_id.
3 4 5 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 3 def user_id @user_id end |
#user_roles ⇒ Object
Returns the value of attribute user_roles.
3 4 5 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 3 def user_roles @user_roles end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/cul/omniauth/ability_proxy.rb', line 13 def to_h return { mime_type: mime_type(), context: context(), content_models: content_models(), publisher: publisher(), remote_ip: remote_ip() } end |