collin-fold 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +19 -0
- data/Rakefile.rb +1 -1
- data/lib/fold/engine.rb +2 -2
- metadata +2 -1
data/README
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
## Collin Miller claims authorship! $$$
|
2
|
+
##### MIT license for all Earthlings ***
|
3
|
+
#### http://www.opensource.org/licenses/mit-license.php ^^^
|
4
|
+
## Martians and Moonlings pay extra ##
|
5
|
+
|
6
|
+
#### You're in the Fold now! %%%
|
7
|
+
|
8
|
+
Inspiration provided by http://haml.hamptoncatlin.com
|
9
|
+
|
10
|
+
Example of a Fold language:
|
11
|
+
http://github.com/collin/lucky7/tree/master/lib/jass.rb
|
12
|
+
|
13
|
+
Example written in that mini-language:
|
14
|
+
http://github.com/collin/lucky7/tree/master/lib/jsspec/example.html.jass
|
15
|
+
|
16
|
+
And the rendered output for the html.jass file:
|
17
|
+
http://github.com/collin/lucky7/tree/master/vendor/js_spec/example.spec.html
|
18
|
+
|
19
|
+
:D
|
data/Rakefile.rb
CHANGED
@@ -24,7 +24,7 @@ namespace :gem do
|
|
24
24
|
file.write %{
|
25
25
|
Gem::Specification.new do |s|
|
26
26
|
s.name = "fold"
|
27
|
-
s.version = "0.0.
|
27
|
+
s.version = "0.0.3"
|
28
28
|
s.platform = Gem::Platform::RUBY
|
29
29
|
s.has_rdoc = false
|
30
30
|
s.summary = "Toolkit for creating whitespace active mini-languages. Inspired by Haml. Feature light."
|
data/lib/fold/engine.rb
CHANGED
@@ -13,8 +13,8 @@ module Fold
|
|
13
13
|
@source.split(/\n/).reject{|line| line.blank?}
|
14
14
|
end
|
15
15
|
|
16
|
-
def render
|
17
|
-
fold.children.map{|child| child.render}
|
16
|
+
def render context
|
17
|
+
precompiler.new.fold(lines).children.map{|child| child.render}
|
18
18
|
end
|
19
19
|
|
20
20
|
# *** me hard
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collin-fold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Collin Miller
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- lib/fold/abstract_fold.rb
|
48
48
|
- lib/fold/fold_factory.rb
|
49
49
|
- lib/fold/precompiler.rb
|
50
|
+
- lib/fold/engine.rb~
|
50
51
|
- rspec/fixtures
|
51
52
|
- rspec/fixtures/fold
|
52
53
|
- rspec/fixtures/fold/fixture.target.fold
|