Class: IndustryType
- Inherits:
-
Object
- Object
- IndustryType
- Includes:
- EnumField::DefineEnum
- Defined in:
- app/models/enums/industry_type.rb
Instance Attribute Summary collapse
-
#attachment_type ⇒ Object
readonly
Returns the value of attribute attachment_type.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, attachment_type = :default) ⇒ IndustryType
constructor
A new instance of IndustryType.
- #title ⇒ Object
Constructor Details
#initialize(code, attachment_type = :default) ⇒ IndustryType
Returns a new instance of IndustryType.
8 9 10 11 |
# File 'app/models/enums/industry_type.rb', line 8 def initialize(code, = :default) @code = code.to_sym @attachment_type = end |
Instance Attribute Details
#attachment_type ⇒ Object (readonly)
Returns the value of attribute attachment_type.
6 7 8 |
# File 'app/models/enums/industry_type.rb', line 6 def @attachment_type end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'app/models/enums/industry_type.rb', line 6 def code @code end |
Instance Method Details
#title ⇒ Object
13 14 15 |
# File 'app/models/enums/industry_type.rb', line 13 def title I18n.t(name, scope: [:industry_type]) end |