Class: OrderNotificationType
- Inherits:
-
Object
- Object
- OrderNotificationType
- Includes:
- EnumField::DefineEnum
- Defined in:
- app/models/enums/order_notification_type.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code) ⇒ OrderNotificationType
constructor
A new instance of OrderNotificationType.
- #title(options = {}) ⇒ Object
Constructor Details
#initialize(code) ⇒ OrderNotificationType
Returns a new instance of OrderNotificationType.
8 9 10 |
# File 'app/models/enums/order_notification_type.rb', line 8 def initialize(code) @code = code.to_sym end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'app/models/enums/order_notification_type.rb', line 6 def code @code end |
Instance Method Details
#title(options = {}) ⇒ Object
12 13 14 |
# File 'app/models/enums/order_notification_type.rb', line 12 def title( = {}) I18n.t(code, .merge(scope: [:account, :notification_type])) end |