Permalink
Browse files

No logic change. Just adding some comments.

  • Loading branch information...
1 parent a0772df commit 6251e7f4ddaf37775cf63c4a7b65f51c6cd3361a @midas committed Nov 17, 2009
Showing with 8 additions and 2 deletions.
  1. +3 −0 lib/guilded/component_def.rb
  2. +3 −2 lib/guilded/guilder.rb
  3. +2 −0 lib/guilded/rails/controller_actions.rb
@@ -12,10 +12,13 @@ def initialize( kind, options={}, libs=[], styles=[], additional_js='' )
@additional_js = additional_js
end
+ # True if this component does not include styles.
+ #
def exclude_css?
options.include?( :exclude_css ) && ( options[:exclude_css] == 'true' || options[:exclude_css] == true )
end
+ #True if this componnent does not include JavaScript.
def exclude_js?
options.include?( :exclude_js ) && ( options[:exclude_js] == 'true' || options[:exclude_js] == true )
end
View
@@ -6,8 +6,9 @@ module Guilded
# Guilder is the worker for the entire Guilded framework. It collects all of the necessary components for a page
# through its add() method. When the g_apply_behavior() method is called at the end of a page, the Guilder writes
- # HTML to include all of the necessary asset files (caching them in production). It also writes s JavaScript initialization
- # function and fires the initialization function on page load.
+ # HTML to include all of the necessary asset files (caching them in production). It also writes a JavaScript initialization
+ # function and fires the initialization function on page load and a before and after initialization callback allowing for
+ # custom initializtion to occur.
#
# This initialization function calls the initialization function for each Guilded component that was added to the current
# page. For example, if a Guilded component named 'g_load_alerter' was added to a page, the Guilder would include this line
@@ -10,6 +10,8 @@ def self.included( base )
end
module InstanceMethods
+ # Clears out the list of Guilded components prior to the next action executing.
+ #
def reset_guilded
Guilded::Guilder.instance.reset!
end

0 comments on commit 6251e7f

Please sign in to comment.