Profile stores ancillary project metadata such as title, summary, list of authors, etc. Profile is the "mother load" of end-user information about a project. It is also arbitraily extensible so fields not strictly defined by this class can also be provided.
Regular expression for matching valid email addresses.
Contact’s email address.
# File lib/pom/profile.rb, line 101 def email if md = RE_EMAIL.match(contact.to_s) md[0] else nil end end
Project’s homepage as listed in the resources.
# File lib/pom/profile.rb, line 88 def homepage resources.homepage end
Profile is extensible. If a setting is assigned that is not already defined an attribute accessor will be created for it.
# File lib/pom/profile.rb, line 124 def method_missing(sym, *args) meth = sym.to_s name = meth.chomp('=') case meth when /=$/ self[name] = args.first else super(sym, *args) if block_given? or args.size > 0 nil end end
Project’s public repository as listed in the resources.
# File lib/pom/profile.rb, line 93 def repository resources.repository end
Set project resources table with a Hash or another Resources object.
# File lib/pom/profile.rb, line 83 def resources=(resources) self['resources'] = Resources.new(resources) end
Override standard respond_to? method to take method_missing lookup into account.
# File lib/pom/profile.rb, line 138 def respond_to?(name) return true if super(name) return true if self[name] return false end
Generated with the Darkfish Rdoc Generator 2.