Class: Rubord::Role

Inherits:
Object
  • Object
show all
Defined in:
lib/rubord/models/role.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Role

Returns a new instance of Role.



8
9
10
11
12
13
# File 'lib/rubord/models/role.rb', line 8

def initialize(data)
  @id           = data["id"]
  @name         = data["name"]
  @permissions  = data["permissions"].to_i
  @position     = data["position"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/rubord/models/role.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/rubord/models/role.rb', line 3

def name
  @name
end

#permissionsObject (readonly)

Returns the value of attribute permissions.



3
4
5
# File 'lib/rubord/models/role.rb', line 3

def permissions
  @permissions
end

#positionObject (readonly)

Returns the value of attribute position.



3
4
5
# File 'lib/rubord/models/role.rb', line 3

def position
  @position
end