Class: HeimdallAuth::User

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion
Defined in:
lib/heimdall_auth/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_environmentObject

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_idObject

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_typeObject

Returns the value of attribute app_type.



6
7
8
# File 'lib/heimdall_auth/user.rb', line 6

def app_type
  @app_type
end

#emailObject

Returns the value of attribute email.



6
7
8
# File 'lib/heimdall_auth/user.rb', line 6

def email
  @email
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/heimdall_auth/user.rb', line 6

def id
  @id
end

#is_adminObject

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_editorObject

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_invalidObject

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_operatorObject

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_policeObject

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_accountingObject

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_providerObject

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_adminObject

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

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/heimdall_auth/user.rb', line 6

def name
  @name
end

#raw_dataObject

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_environmentObject



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_typeObject



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

Returns:

  • (Boolean)


26
27
28
# File 'lib/heimdall_auth/user.rb', line 26

def persisted?
  false
end