Class: Rubyang::Database::SchemaTree::BooleanType
- Defined in:
- lib/rubyang/database/schema_tree.rb
Instance Attribute Summary
Attributes inherited from Type
Instance Method Summary collapse
-
#initialize ⇒ BooleanType
constructor
A new instance of BooleanType.
- #valid?(value) ⇒ Boolean
Constructor Details
#initialize ⇒ BooleanType
Returns a new instance of BooleanType.
121 122 123 |
# File 'lib/rubyang/database/schema_tree.rb', line 121 def initialize @arg = 'boolean' end |
Instance Method Details
#valid?(value) ⇒ Boolean
124 125 126 127 128 129 130 131 132 |
# File 'lib/rubyang/database/schema_tree.rb', line 124 def valid? value if 'true' == value true elsif 'false' == value true else false end end |