Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more

In Files

  • tk/lib/tk/bindtag.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

TkDatabaseClass

Public Class Methods

new(name, *args, &b) click to toggle source

def self.new(name, *args, &b)

BTagID_TBL.mutex.synchronize{
  return BTagID_TBL[name] if BTagID_TBL[name]
}
super(name, *args, &b)

end

def initialize(name, *args, &b)

@id = name
BTagID_TBL.mutex.synchronize{
  BTagID_TBL[@id] = self
}
bind(*args, &b) if args != []

end

 
               # File tk/lib/tk/bindtag.rb, line 116
def self.new(name, *args, &b)
  BTagID_TBL.mutex.synchronize{
    if BTagID_TBL[name]
      BTagID_TBL[name]
    else
      BTagID_TBL[name] = self.allocate.instance_eval{
        initialize(name, *args, &b)
        self
      }
    end
  }
end
            
new(name, *args, &b) click to toggle source
 
               # File tk/lib/tk/bindtag.rb, line 129
def initialize(name, *args, &b)
  @id = name
  bind(*args, &b) if args != []
end
            

Public Instance Methods

inspect() click to toggle source
 
               # File tk/lib/tk/bindtag.rb, line 134
def inspect
  #Kernel.format "#<TkDatabaseClass: %s>", @id
  '#<TkDatabaseClass: ' + @id + '>'
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.