Class: Notifo::TopicChannel
- Inherits:
-
Object
- Object
- Notifo::TopicChannel
- Defined in:
- lib/notifo/models/topic_channel.rb
Constant Summary collapse
- NOT_ALLOWED =
'NotAllowed'.freeze
- ALLOWED =
'Allowed'.freeze
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
22 23 24 25 26 |
# File 'lib/notifo/models/topic_channel.rb', line 22 def build_from_hash(value) constantValues = TopicChannel.constants.select { |c| TopicChannel::const_get(c) == value } raise "Invalid ENUM value #{value} for class #TopicChannel" if constantValues.empty? value end |