Class: Rubyang::Database::SchemaTree::EnumerationType

Inherits:
Type
  • Object
show all
Defined in:
lib/rubyang/database/schema_tree.rb

Instance Attribute Summary

Attributes inherited from Type

#arg

Instance Method Summary collapse

Constructor Details

#initializeEnumerationType

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

Returns:

  • (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