Method: Rubyang::Database::SchemaTree::Bit#valid?

Defined in:
lib/rubyang/database/schema_tree.rb

#valid?(value) ⇒ Boolean

Returns:

  • (Boolean)


377
378
379
380
381
382
383
384
# File 'lib/rubyang/database/schema_tree.rb', line 377

def valid? value
  values = value.split( ' ' )
  if values.inject( true ){ |result, v| result && @bit.find{ |b| b == v } }
    true
  else
    false
  end
end