Bitfield with all valid flags set
Returns the intersection of flags in self and flags.
# File lib/dnssd/flags.rb, line 42 42: def &(flags) 43: self.class.new(to_i & flags.to_i) 44: end
self is equal if other has the same flags
# File lib/dnssd/flags.rb, line 49 49: def ==(other) 50: to_i == other.to_i 51: end
Clears flag
# File lib/dnssd/flags.rb, line 56 56: def clear_flag(flag) 57: @flags &= ~flag 58: 59: verify 60: end
Sets flag
# File lib/dnssd/flags.rb, line 71 71: def set_flag(flag) 72: @flags |= flag 73: 74: verify 75: end
Returns an Array of flag names
# File lib/dnssd/flags.rb, line 80 80: def to_a 81: FLAGS.map do |name, value| 82: (@flags & value == value) ? name : nil 83: end.compact 84: end
Flags as a bitfield
# File lib/dnssd/flags.rb, line 89 89: def to_i 90: @flags 91: end
Trims the flag list down to valid flags
# File lib/dnssd/flags.rb, line 96 96: def verify 97: @flags &= ALL_FLAGS 98: 99: self 100: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.