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