Class: Rubyang::Database::SchemaTree::EnumerationType
- Defined in:
- lib/rubyang/database/schema_tree.rb
Instance Attribute Summary
Attributes inherited from Type
Instance Method Summary collapse
-
#initialize ⇒ EnumerationType
constructor
A new instance of EnumerationType.
- #update_enum(arg) ⇒ Object
- #valid?(value) ⇒ Boolean
Constructor Details
#initialize ⇒ EnumerationType
Returns a new instance of EnumerationType.
135 136 137 138 |
# File 'lib/rubyang/database/schema_tree.rb', line 135 def initialize @arg = 'enumeration' @enum = Enum.new end |
Instance Method Details
#update_enum(arg) ⇒ Object
139 140 141 |
# File 'lib/rubyang/database/schema_tree.rb', line 139 def update_enum arg @enum.update arg end |
#valid?(value) ⇒ Boolean
142 143 144 145 146 |
# File 'lib/rubyang/database/schema_tree.rb', line 142 def valid? value result = true result &&= @enum.valid? value result end |