Sha256: 73425bc34758dad9e5bd8ee046e0a71d3033abb9f41654c59003073d4d142f46

Contents?: true

Size: 656 Bytes

Versions: 15

Compression:

Stored size: 656 Bytes

Contents

class Foo < WLang::Dialect

  def _(fn)
    fn ? render(fn) : nil
  end

  def execution(buf, fn)
    buf << "(foo#execution #{_ fn})"
  end

  def escaping(buf, fn)
    buf << "(foo#escaping #{_ fn})"
  end

  tag "!", :execution
  tag "$", :escaping
  tag "@"  do |buf,fn| buf << "(foo#link #{_ fn})";   end
  tag "<"  do |buf,fn| buf << "(foo#less #{_ fn})";   end
  tag '!@' do |buf,fn| buf << "(foo#bangat #{_ fn})"; end
end

class Bar < Foo

  def escaping(buf, fn)
    buf << "(bar#escaping #{_ fn})"
  end

  tag "$", :escaping
  tag "<" do |buf,fn| buf << "(bar#less #{_ fn})";    end
  tag ">" do |buf,fn| buf << "(bar#greater #{_ fn})"; end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
wlang-3.0.1 spec/fixtures/dialect/foobar.rb
wlang-3.0.0 spec/fixtures/dialect/foobar.rb
wlang-2.3.1 spec/fixtures/dialect/foobar.rb
wlang-2.3.0 spec/fixtures/dialect/foobar.rb
wlang-2.2.4 spec/fixtures/dialect/foobar.rb
wlang-2.2.3 spec/fixtures/dialect/foobar.rb
wlang-2.2.2 spec/fixtures/dialect/foobar.rb
wlang-2.2.1 spec/fixtures/dialect/foobar.rb
wlang-2.2.0 spec/fixtures/dialect/foobar.rb
wlang-2.1.2 spec/fixtures/dialect/foobar.rb
wlang-2.1.1 spec/fixtures/dialect/foobar.rb
wlang-2.1.0 spec/fixtures/dialect/foobar.rb
wlang-2.0.1 spec/fixtures/dialect/foobar.rb
wlang-2.0.0 spec/fixtures/dialect/foobar.rb
wlang-2.0.0.beta spec/fixtures/dialect/foobar.rb