Class: HeimdallAuth::User
- Inherits:
-
Object
- Object
- HeimdallAuth::User
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion
- Defined in:
- lib/heimdall_auth/user.rb
Instance Attribute Summary collapse
-
#app_environment ⇒ Object
Returns the value of attribute app_environment.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#app_type ⇒ Object
Returns the value of attribute app_type.
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_admin ⇒ Object
Returns the value of attribute is_admin.
-
#is_editor ⇒ Object
Returns the value of attribute is_editor.
-
#is_invalid ⇒ Object
Returns the value of attribute is_invalid.
-
#is_operator ⇒ Object
Returns the value of attribute is_operator.
-
#is_police ⇒ Object
Returns the value of attribute is_police.
-
#is_ride_on_demand_accounting ⇒ Object
Returns the value of attribute is_ride_on_demand_accounting.
-
#is_ride_on_demand_provider ⇒ Object
Returns the value of attribute is_ride_on_demand_provider.
-
#is_user_admin ⇒ Object
Returns the value of attribute is_user_admin.
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ User
constructor
A new instance of User.
- #key_environment ⇒ Object
- #key_type ⇒ Object
- #persisted? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ User
Returns a new instance of User.
8 9 10 11 12 13 14 |
# File 'lib/heimdall_auth/user.rb', line 8 def initialize(attributes = {}) attributes.each do |name, value| setter_method = "#{name}=" send(setter_method, value) if self.respond_to? setter_method end self.raw_data = attributes.to_json end |
Instance Attribute Details
#app_environment ⇒ Object
Returns the value of attribute app_environment.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def app_environment @app_environment end |
#app_id ⇒ Object
Returns the value of attribute app_id.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def app_id @app_id end |
#app_type ⇒ Object
Returns the value of attribute app_type.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def app_type @app_type end |
#email ⇒ Object
Returns the value of attribute email.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def id @id end |
#is_admin ⇒ Object
Returns the value of attribute is_admin.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def is_admin @is_admin end |
#is_editor ⇒ Object
Returns the value of attribute is_editor.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def is_editor @is_editor end |
#is_invalid ⇒ Object
Returns the value of attribute is_invalid.
5 6 7 |
# File 'lib/heimdall_auth/user.rb', line 5 def is_invalid @is_invalid end |
#is_operator ⇒ Object
Returns the value of attribute is_operator.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def is_operator @is_operator end |
#is_police ⇒ Object
Returns the value of attribute is_police.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def is_police @is_police end |
#is_ride_on_demand_accounting ⇒ Object
Returns the value of attribute is_ride_on_demand_accounting.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def is_ride_on_demand_accounting @is_ride_on_demand_accounting end |
#is_ride_on_demand_provider ⇒ Object
Returns the value of attribute is_ride_on_demand_provider.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def is_ride_on_demand_provider @is_ride_on_demand_provider end |
#is_user_admin ⇒ Object
Returns the value of attribute is_user_admin.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def is_user_admin @is_user_admin end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def name @name end |
#raw_data ⇒ Object
Returns the value of attribute raw_data.
6 7 8 |
# File 'lib/heimdall_auth/user.rb', line 6 def raw_data @raw_data end |
Instance Method Details
#key_environment ⇒ Object
21 22 23 24 |
# File 'lib/heimdall_auth/user.rb', line 21 def key_environment Rails.logger.warn("key_environment is deprecated, please use app_environment") app_environment end |
#key_type ⇒ Object
16 17 18 19 |
# File 'lib/heimdall_auth/user.rb', line 16 def key_type Rails.logger.warn("key_type is deprecated, please use app_type") app_type end |
#persisted? ⇒ Boolean
26 27 28 |
# File 'lib/heimdall_auth/user.rb', line 26 def persisted? false end |