Class: Rubyang::Database::SchemaTree::BinaryType

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

#initializeBinaryType

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

Returns:

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