Class: RiceBubble::Attributes::Enum

Inherits:
Any
  • Object
show all
Defined in:
lib/rice_bubble/attributes/enum.rb

Instance Attribute Summary

Attributes inherited from Any

#members

Instance Method Summary collapse

Methods inherited from Any

#call, #description, #valid?, #which

Methods inherited from Base

#call, #description, #fetch, #optional, #valid?, #valid_types

Constructor Details

#initialize(*members) ⇒ Enum

Returns a new instance of Enum.



4
5
6
# File 'lib/rice_bubble/attributes/enum.rb', line 4

def initialize(*members, &)
  super(*members.flatten.map { |m| Literal.new(m) }, &)
end