Sha256: 83ee9ca0c82099b6f80c7e34cf76853eb05c340bef5235858ac8b93fd29ed3f1

Contents?: true

Size: 348 Bytes

Versions: 18

Compression:

Stored size: 348 Bytes

Contents

module ExpressTemplates
  module Markup
    class Yielder
      def initialize(*args)
        @arg = args.first
      end

      def compile
        if @arg
          "yield(#{@arg.inspect})" # usually a symbol but may be string
        else
          "yield"
        end
      end

      def to_template
        compile
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
express_admin-1.2.1 vendor/gems/express_templates/lib/express_templates/markup/yielder.rb
express_admin-1.2.0 vendor/gems/express_templates/lib/express_templates/markup/yielder.rb
express_templates-0.5.0 lib/express_templates/markup/yielder.rb
express_templates-0.4.2 lib/express_templates/markup/yielder.rb
express_templates-0.4.1 lib/express_templates/markup/yielder.rb
express_templates-0.4.0 lib/express_templates/markup/yielder.rb
express_templates-0.3.6 lib/express_templates/markup/yielder.rb
express_templates-0.3.5 lib/express_templates/markup/yielder.rb
express_templates-0.3.4 lib/express_templates/markup/yielder.rb
express_templates-0.3.2 lib/express_templates/markup/yielder.rb
express_templates-0.3.1 lib/express_templates/markup/yielder.rb
express_templates-0.3.0 lib/express_templates/markup/yielder.rb
express_templates-0.2.7 lib/express_templates/markup/yielder.rb
express_templates-0.2.6 lib/express_templates/markup/yielder.rb
express_templates-0.2.5 lib/express_templates/markup/yielder.rb
express_templates-0.2.4 lib/express_templates/markup/yielder.rb
express_templates-0.2.3 lib/express_templates/markup/yielder.rb
express_templates-0.2.2 lib/express_templates/markup/yielder.rb