lib/java_head.rb
# Creates either a class or a package
# depending on the format of the given string
#
# @param [String] name the name of the child element
# @return [JavaHead::Package, JavaHead::Class] the resulting package or class object
Creates either a class or a package
depending on the format of the given string
Creates either a class or a package depending on the format of the given string
def member(name)
      if name.match JavaHead::Class::FORMAT
        self.class(name)
      else
        package(name)
      end
    end
def member ( name ) if name . match JavaHead :: Class :: FORMAT self . class ( name ) else package ( name ) end end
Creates either a class or a package
depending on the format of the given string
Creates either a class or a package depending on the format of the given string
the resulting package or class object
the resulting package or class object
JavaHead::Package, JavaHead::Class
name
name the name of the child element
name the name of the child element