Sha256: bf11bfcc924dd0c3356189433d3470e9140717de0a216dfcd9c3a53e681e0140

Contents?: true

Size: 400 Bytes

Versions: 8

Compression:

Stored size: 400 Bytes

Contents

# Copyright 2008 Jeff Mesnil (http://jmesnil.net)
#
# This file adds methods to ObjectName proxies
require 'java'

JavaUtilities.extend_proxy('javax.management.ObjectName') do
  def key?(k)
    self.contains_key k
  end
  alias has_key? key?
  alias include? key?
  alias member? key?
  
  def keys
    self.get_key_property_list.key_set
  end
  
  def [](key)
    self.get_key_property key
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jmx4r-0.1.4 lib/objectname_helper.rb
jmx4r-0.1.3 lib/objectname_helper.rb
jmx4r-0.1.2 lib/objectname_helper.rb
jmx4r-0.1.1 lib/objectname_helper.rb
jmx4r-0.1.0 lib/objectname_helper.rb
jmx4r-0.0.8 lib/objectname_helper.rb
jmx4r-0.0.6 lib/objectname_helper.rb
jmx4r-0.0.7 lib/objectname_helper.rb