lib/rubigen/base.rb
# Return the full path from the source root for the given path.
# Example for source_root = '/source':
#   source_path('some/path.rb') == '/source/some/path.rb'
#
# The given path may include a colon ':' character to indicate that
# the file belongs to another generator.  This notation allows any
# generator to borrow files from another.  Example:
#   source_path('model:fixture.yml') = '/model/source/path/fixture.yml'
Return the full path from the source root for the given path.

The given path may include a colon ':' character to indicate that
the file belongs to another generator.  This notation allows any
generator to borrow files from another.
Return the full path from the source root for the given path . The given path may include a colon ' : ' character to indicate that the file belongs to another generator . This notation allows any generator to borrow files from another .
def source_path(relative_source)
      name, path = relative_source.split(':', 2)
      if path.nil?
        File.join(source_root, name)
      else
        File.join(self.class.lookup(name).path, 'templates', path)
      end
    end
def source_path ( relative_source ) name , path = relative_source . split ( ':' , 2 ) if path . nil? File . join ( source_root , name ) else File . join ( self . class . lookup ( name ) . path , 'templates' , path ) end end
Return the full path from the source root for the given path.
Return the full path from the source root for the given path .
# Check whether we're referring to another generator's file. # If not, return the full path to our source file. # Otherwise, ask our referral for the file. # FIXME: this is broken, though almost always true.  Others' # source_root are not necessarily the templates dir.
relative_source
<not_specific>