Class: Rubyang::Database::SchemaTree::BinaryType
- Defined in:
- lib/rubyang/database/schema_tree.rb
Instance Attribute Summary
Attributes inherited from Type
Instance Method Summary collapse
-
#initialize ⇒ BinaryType
constructor
A new instance of BinaryType.
- #update_length(arg) ⇒ Object
- #valid?(value) ⇒ Boolean
Constructor Details
#initialize ⇒ BinaryType
Returns a new instance of BinaryType.
163 164 165 166 |
# File 'lib/rubyang/database/schema_tree.rb', line 163 def initialize @arg = 'binary' @length = Length.new end |
Instance Method Details
#update_length(arg) ⇒ Object
167 168 169 |
# File 'lib/rubyang/database/schema_tree.rb', line 167 def update_length arg @length.update arg end |
#valid?(value) ⇒ Boolean
170 171 172 173 174 |
# File 'lib/rubyang/database/schema_tree.rb', line 170 def valid? value result = true result &&= @length.valid? Base64.strict_decode64( value ) result end |