Class: Freeberry::Models::RoleType
- Inherits:
-
Object
- Object
- Freeberry::Models::RoleType
- Defined in:
- lib/freeberry/models/role_type.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code) ⇒ RoleType
constructor
A new instance of RoleType.
- #title ⇒ Object
Constructor Details
#initialize(code) ⇒ RoleType
Returns a new instance of RoleType.
5 6 7 |
# File 'lib/freeberry/models/role_type.rb', line 5 def initialize(code) @code = code.to_sym end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/freeberry/models/role_type.rb', line 8 def code @code end |
Instance Method Details
#title ⇒ Object
10 11 12 |
# File 'lib/freeberry/models/role_type.rb', line 10 def title I18n.t(@code, :scope => [:manage, :role, :kind]) end |