Class: Rubord::Role
- Inherits:
-
Object
- Object
- Rubord::Role
- Defined in:
- lib/rubord/models/role.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(data) ⇒ Role
constructor
A new instance of Role.
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/rubord/models/role.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rubord/models/role.rb', line 3 def name @name end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
3 4 5 |
# File 'lib/rubord/models/role.rb', line 3 def @permissions end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
3 4 5 |
# File 'lib/rubord/models/role.rb', line 3 def position @position end |