lib/sproutcore/helpers/static_helper.rb
# This method will return the HTML to link to all the stylesheets
# required by the named bundle.  If you pass no options, the current
# client will be used.
#
# bundle_name = the name of the bundle to render or nil to use the
# current :language => the language to render. defaults to current
# language
#
This method will return the HTML to link to all the stylesheets
required by the named bundle.  If you pass no options, the current
client will be used.

bundle_name = the name of the bundle to render or nil to use the
current :language => the language to render. defaults to current
language
This method will return the HTML to link to all the stylesheets required by the named bundle . If you pass no options the current client will be used . bundle_name = the name of the bundle to render or nil to use the current : language = > the language to render . defaults to current language
def stylesheets_for_client(bundle_name = nil, opts = {})
        opts[:language] ||= language
        opts[:platform] ||= platform
        include_method = opts[:include_method] ||= :link
        cur_bundle = bundle_name.nil? ? bundle : library.bundle_for(bundle_name)
        all_bundles = cur_bundle.all_required_bundles
        urls = []
        all_bundles.each do |b|
          urls += b.sorted_stylesheet_entries(opts).map { |x| x.cacheable_url }
        end
        all_bundles.each do |b|
          urls += b.stylesheet_libs.reject { |lib| urls.include? lib } if b.stylesheet_libs
        end
        urls = urls.map do |url|
          if include_method == :import
            %(  @import url('#{url}');)
          else
            %(  <link href="#{url}" rel="stylesheet" type="text/css" />)
          end
        end
        if include_method == :import
          %(<style type="text/css">\n#{urls * "\n"}</style>)
        else
          urls.join("\n")
        end
      end
def stylesheets_for_client ( bundle_name = nil , opts = { } ) opts [ :language ] ||= language opts [ :platform ] ||= platform include_method = opts [ :include_method ] ||= :link cur_bundle = bundle_name . nil? ? bundle : library . bundle_for ( bundle_name ) all_bundles = cur_bundle . all_required_bundles urls = [ ] all_bundles . each do | b | urls += b . sorted_stylesheet_entries ( opts ) . map { | x | x . cacheable_url } end all_bundles . each do | b | urls += b . stylesheet_libs . reject { | lib | urls . include? lib } if b . stylesheet_libs end urls = urls . map do | url | if include_method == :import %(  @import url('#{url}');) else %(  <link href="#{url}" rel="stylesheet" type="text/css" />) end end if include_method == :import %(<style type="text/css">\n#{urls * "\n"}</style>) else urls . join ( "\n" ) end end
This method will return the HTML to link to all the stylesheets
required by the named bundle.
This method will return the HTML to link to all the stylesheets required by the named bundle .
# Set the import method to use the standard <link> tag, if not set # Get bundle # Convert to a list of required bundles # For each bundle, get the ordered list of stylsheet urls # Convert to HTML and return # if include style is @import, surround with style tags
bundle_name
<not_specific>
opts
<not_specific>