Class: Pebbles::Uid::Oid

Inherits:
Labels
  • Object
show all
Defined in:
lib/pebbles-uid/oid.rb

Constant Summary

Constants inherited from Labels

Labels::NO_MARKER

Instance Attribute Summary

Attributes inherited from Labels

#max_depth, #name, #stop, #suffix, #values

Instance Method Summary collapse

Methods inherited from Labels

#child_of?, #conditions, #each, #initialize, #next_label, #parent_of?, #size, #tail, #to_s, #use_stop_marker?, #valid_with?

Constructor Details

This class inherits a constructor from Pebbles::Uid::Labels

Instance Method Details

#ambiguous?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/pebbles-uid/oid.rb', line 6

def ambiguous?
  value == '*' || value.empty?
end

#empty?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/pebbles-uid/oid.rb', line 10

def empty?
  value.empty?
end

#multiple?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/pebbles-uid/oid.rb', line 14

def multiple?
  !!(value =~ /[\|]/)
end

#to_hash(options = {}) ⇒ Object



22
23
24
25
# File 'lib/pebbles-uid/oid.rb', line 22

def to_hash(options = {})
  options.delete(:verbose)
  super({:verbose => false, :name => 'oid'}.merge(options))
end

#wildcard?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/pebbles-uid/oid.rb', line 18

def wildcard?
  value == '*' || multiple?
end