Class: Nextcloud::Models::User
- Inherits:
-
Object
- Object
- Nextcloud::Models::User
- Defined in:
- lib/nextcloud/models/user.rb
Overview
User model
Class Attribute Summary collapse
-
.params ⇒ Object
readonly
Returns the value of attribute params.
Instance Attribute Summary collapse
-
#address ⇒ String
User address.
-
#displayname ⇒ String
User display name.
-
#email ⇒ String
E-mail address.
-
#enabled ⇒ String
Is an user enabled or not.
-
#groups ⇒ String
Groups user belongs to.
-
#id ⇒ String
Identifier of an user.
-
#language ⇒ String
Nextcloud version for an user.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#phone ⇒ String
User phone number.
-
#quota ⇒ Hash
Quota of user.
-
#twitter ⇒ String
User Twitter account.
-
#website ⇒ String
User web-site address.
Instance Method Summary collapse
-
#initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) ⇒ User
constructor
Initiates a model instance.
Constructor Details
#initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) ⇒ User
Initiates a model instance
33 34 35 36 37 38 39 40 |
# File 'lib/nextcloud/models/user.rb', line 33 def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end |
Class Attribute Details
.params ⇒ Object (readonly)
Returns the value of attribute params.
46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 46 def params @params end |
Instance Attribute Details
#address ⇒ String
Returns User address.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#displayname ⇒ String
Returns User display name.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#email ⇒ String
Returns E-mail address.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#enabled ⇒ String
Returns Is an user enabled or not.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#groups ⇒ String
Returns Groups user belongs to.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#id ⇒ String
Returns Identifier of an user.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#language ⇒ String
Returns Nextcloud version for an user.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#meta ⇒ Object
Returns the value of attribute meta.
28 29 30 |
# File 'lib/nextcloud/models/user.rb', line 28 def @meta end |
#phone ⇒ String
Returns User phone number.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#quota ⇒ Hash
Returns Quota of user.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#twitter ⇒ String
Returns User Twitter account.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |
#website ⇒ String
Returns User web-site address.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nextcloud/models/user.rb', line 27 class User attr_accessor :meta # Initiates a model instance # # @param [Hash] def initialize(enabled: nil, id: nil, quota: nil, email: nil, displayname: nil, phone: nil, address: nil, website: nil, twitter: nil, groups: nil, language: nil) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end end |