Sha256: f9920c1994b8e2422304ac5acb8b95764bb33f919ad4577c1db8e7724c901490
Contents?: true
Size: 906 Bytes
Versions: 2
Compression:
Stored size: 906 Bytes
Contents
module Archetype::SassExtensions::Styleguide private # # check whether or not a component (or a component extension) has already been defined # # *Parameters*: # - <tt>id</tt> {String} the component identifier # - <tt>theme</tt> {String} the theme to insert the component into # - <tt>extension</tt> {String} the name of the extension # - <tt>force</tt> {Boolean} if true, forcibly extend the component # *Returns*: # - {Boolean} whether or not the component/extension exists # def component_exists(id, theme = nil, extension = nil, force = false) status = false theme = get_theme(theme) if not theme.is_a? Hash id = helpers.to_str(id) # determine the status of the component status = (extension.nil?) ? (not theme[:components][id].nil?) : theme[:extensions].include?(extension) return (status and not force and Compass.configuration.memoize) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
archetype-1.0.0.alpha.2 | lib/archetype/sass_extensions/functions/styleguide/components.rb |
archetype-1.0.0.alpha.1 | lib/archetype/sass_extensions/functions/styleguide/components.rb |