<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/assigns.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,7 @@ lib/cassandra.rb
 lib/properties.rb
 lib/tags.rb
 Manifest
+misc/dan.cssy
 misc/dan.rb
 misc/meyer_reset.css
 README.rdoc
@@ -12,8 +13,8 @@ site/cssy_title.jpg
 site/flower.png
 site/index.mab
 site/ruby.cssy
+test/assigns.rb
+test/basics.css
+test/basics.cssy
 test/basics.rb
-test/dan.cssy
-test/fiddle.css
-test/fiddle.cssy
 test/helper.rb</diff>
      <filename>Manifest</filename>
    </modified>
    <modified>
      <diff>@@ -54,6 +54,7 @@ end
 
 
 # List all the desired pages as dependencies on :compile
+desc &quot;compile templates to html and css&quot;
 task :compile =&gt; %w{ site/index.html site/basic.css site/ruby.css }
 
 task :clean do
@@ -65,7 +66,7 @@ rule '.html' =&gt; [ '.mab' ] do |t|
   mab(t.source, t.name)
 end
 
-file 'site/index.mab' =&gt; [ 'site/basic.rb' ]
+file 'site/index.html' =&gt; [ 'site/basic.css', 'site/index.mab' ]
 
 rule '.css' =&gt; [ '.cssy' ] do |t|
   cssify(t.source, t.name)
@@ -84,7 +85,8 @@ def mab(source, target)
 end
 
 def cssify(source, target)
-  c = Cssy.new.process(File.read(source))
+  cssy = File.read(source)
+  c = Cssy.new.process(cssy, { :default =&gt; &quot;#212F54&quot; })
   File.open(target, 'w') do |f|
     f.puts c.to_s
   end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -8,11 +8,11 @@ Gem::Specification.new do |s|
 
   s.required_rubygems_version = Gem::Requirement.new(&quot;&gt;= 0&quot;) if s.respond_to? :required_rubygems_version=
   s.authors = [&quot;Matthew King&quot;]
-  s.date = %q{2008-09-08}
+  s.date = %q{2008-09-30}
   s.description = %q{Generates CSS using Ruby, like Markaby}
   s.email = %q{automatthew@gmail.com}
   s.extra_rdoc_files = [&quot;lib/cassandra.rb&quot;, &quot;lib/properties.rb&quot;, &quot;lib/tags.rb&quot;, &quot;README.rdoc&quot;]
-  s.files = [&quot;cassandra.gemspec&quot;, &quot;lib/cassandra.rb&quot;, &quot;lib/properties.rb&quot;, &quot;lib/tags.rb&quot;, &quot;Manifest&quot;, &quot;misc/dan.rb&quot;, &quot;misc/meyer_reset.css&quot;, &quot;README.rdoc&quot;, &quot;site/basic.cssy&quot;, &quot;site/basic.rb&quot;, &quot;site/cssy_title.jpg&quot;, &quot;site/flower.png&quot;, &quot;site/index.mab&quot;, &quot;site/ruby.cssy&quot;, &quot;test/basics.rb&quot;, &quot;test/dan.cssy&quot;, &quot;test/fiddle.css&quot;, &quot;test/fiddle.cssy&quot;, &quot;test/helper.rb&quot;]
+  s.files = [&quot;cassandra.gemspec&quot;, &quot;lib/cassandra.rb&quot;, &quot;lib/properties.rb&quot;, &quot;lib/tags.rb&quot;, &quot;Manifest&quot;, &quot;misc/dan.cssy&quot;, &quot;misc/dan.rb&quot;, &quot;misc/meyer_reset.css&quot;, &quot;README.rdoc&quot;, &quot;site/basic.cssy&quot;, &quot;site/basic.rb&quot;, &quot;site/cssy_title.jpg&quot;, &quot;site/flower.png&quot;, &quot;site/index.mab&quot;, &quot;site/ruby.cssy&quot;, &quot;test/assigns.rb&quot;, &quot;test/basics.css&quot;, &quot;test/basics.cssy&quot;, &quot;test/basics.rb&quot;, &quot;test/helper.rb&quot;]
   s.has_rdoc = true
   s.homepage = %q{}
   s.rdoc_options = [&quot;--line-numbers&quot;, &quot;--inline-source&quot;, &quot;--title&quot;, &quot;Cassandra&quot;, &quot;--main&quot;, &quot;README.rdoc&quot;]
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
   s.rubyforge_project = %q{cassandra}
   s.rubygems_version = %q{1.2.0}
   s.summary = %q{Generates CSS using Ruby, like Markaby}
-  s.test_files = [&quot;test/basics.rb&quot;, &quot;test/helper.rb&quot;]
+  s.test_files = [&quot;test/assigns.rb&quot;, &quot;test/basics.rb&quot;, &quot;test/helper.rb&quot;]
 
   if s.respond_to? :specification_version then
     current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -92,6 +92,7 @@ end
 # 
 # 
 # # List all the desired pages as dependencies on :compile
+# desc &quot;compile templates to html and css&quot;
 # task :compile =&gt; %w{ site/index.html site/basic.css site/ruby.css }
 # 
 # task :clean do
@@ -103,7 +104,7 @@ end
 #   mab(t.source, t.name)
 # end
 # 
-# file 'site/index.mab' =&gt; [ 'site/basic.rb' ]
+# file 'site/index.html' =&gt; [ 'site/basic.css', 'site/index.mab' ]
 # 
 # rule '.css' =&gt; [ '.cssy' ] do |t|
 #   cssify(t.source, t.name)
@@ -122,7 +123,8 @@ end
 # end
 # 
 # def cssify(source, target)
-#   c = Cssy.new.process(File.read(source))
+#   cssy = File.read(source)
+#   c = Cssy.new.process(cssy, { :default =&gt; &quot;#212F54&quot; })
 #   File.open(target, 'w') do |f|
 #     f.puts c.to_s
 #   end</diff>
      <filename>cassandra.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -43,7 +43,7 @@ require 'tags'
 class Cassandra
   
   # Clear out unneeded methods
-  METHODS = %w( class instance_eval send __send__ __id__ )
+  METHODS = %w( class instance_eval send __send__ __id__ instance_variable_set )
   instance_methods.each { |m| undef_method( m ) unless METHODS.include? m }
   
   attr_reader :data
@@ -63,6 +63,12 @@ class Cassandra
     @state = :closed_block
   end
   
+  def instance_variables(hashlike)
+    hashlike.each do |key,val|
+      instance_variable_set(&quot;@#{key}&quot;,val)
+    end
+  end
+  
   # Create a new instance and process the supplied block, returning the instance.
   # 
   #   css = Cssy.process do
@@ -70,8 +76,8 @@ class Cassandra
   #       li { list_style :none }
   #     end
   #   end
-  def self.process(*args,&amp;block)
-    self.new.process(*args,&amp;block)
+  def self.process(*args, &amp;block)
+    self.new.process(*args, &amp;block)
   end
   
   # Process the supplied block (storing the result internally as an array in @data).  
@@ -79,10 +85,13 @@ class Cassandra
   # 
   # If no block is given, join all arguments with &quot;\n&quot; and eval the result.  Dubious utility.
   def process(*args, &amp;block)
+    assigns = args[0]      if args[0].is_a? Hash
+    string, assigns = args if args[0].is_a? String
+    instance_variables(assigns) if assigns
     if block
       instance_eval(&amp;block)
-    else
-      instance_eval(args.join(&quot;\n&quot;))
+    elsif string
+      instance_eval(string)
     end
     self
   end</diff>
      <filename>lib/cassandra.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
-@default = &quot;#212F54&quot;
+@full = &quot;700px&quot;
 
 body { background_color &quot;#F8F7F1&quot;}
 div.content! { 
-  width &quot;700px&quot;; margin &quot;25px auto&quot;
+  width @full; margin &quot;25px auto&quot;
   
   h1 { color @default }
   </diff>
      <filename>site/basic.cssy</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-x = Cssy.new.process do
+css = Cssy.new.process do
 
   @default = &quot;#212F54&quot;
 
@@ -19,4 +19,4 @@ x = Cssy.new.process do
   
 end
 
-puts x.data.inspect
\ No newline at end of file
+css.to_s
\ No newline at end of file</diff>
      <filename>site/basic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
 require 'syntax/convertors/html'
-convertor = Syntax::Convertors::HTML.for_syntax &quot;ruby&quot;
 
 html do 
   head do
@@ -11,7 +10,17 @@ html do
     div.content! do
       img.logo! :src =&gt; &quot;cssy_title.jpg&quot;
       div.ruby.example! do
-        convertor.convert( File.read( &quot;site/basic.rb&quot; ) ).to_s
+        example = &lt;&lt;TEXT
+css = Cssy.new
+css.process(:default =&gt; &quot;#212F54&quot;) do
+  
+  #{File.readlines( &quot;site/basic.cssy&quot;).join(&quot;  &quot;) }
+  
+end
+
+css.to_s
+TEXT
+        Syntax::Convertors::HTML.for_syntax(&quot;ruby&quot;).convert( example ).to_s
       end
       ul.links! do
         li { a &quot;GitHub&quot;, :href =&gt; &quot;http://github.com/automatthew/cassandra&quot; }</diff>
      <filename>site/index.mab</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a2e4395e5fd9804c52444086fdb0ddb5df17f12e</id>
    </parent>
  </parents>
  <author>
    <name>Matthew King</name>
    <email>automatthew@gmail.com</email>
  </author>
  <url>http://github.com/automatthew/cassandra/commit/436559718c6151fb1b175dfa269ca26821812fdd</url>
  <id>436559718c6151fb1b175dfa269ca26821812fdd</id>
  <committed-date>2008-09-30T10:17:47-07:00</committed-date>
  <authored-date>2008-09-30T10:15:28-07:00</authored-date>
  <message>process now takes an assigns hash</message>
  <tree>7cdf286ac41d66484735f1e370c8c8dd47a28abc</tree>
  <committer>
    <name>Matthew King</name>
    <email>automatthew@gmail.com</email>
  </committer>
</commit>
