Sha256: 32e49fa457237d6463ac96ca73fba27426a01eb9526baa8129fa1f1e50871a85

Contents?: true

Size: 764 Bytes

Versions: 188

Compression:

Stored size: 764 Bytes

Contents

$ erubis -l cpp example.ecpp
#line 1 "example.ecpp"

#include <string>
#include <iostream>
#include <sstream>

int main(int argc, char *argv[])
{
    std::stringstream _buf;

_buf << "<html>\n"
        " <body>\n"
        "  <p>Hello "; _buf << (argv[0]); _buf << "!</p>\n"
        "  <table>\n"
        "   <tbody>\n";
     for (int i = 1; i < argc; i++) { 
_buf << "    <tr bgcolor=\""; _buf << (i % 2 == 0 ? "#FFCCCC" : "#CCCCFF"); _buf << "\">\n"
        "      <td>"; _buf << (i); _buf << "</td>\n"
        "      <td>"; _buf << (argv[i]); _buf << "</td>\n"
        "    </tr>\n";
     } 
_buf << "   </tbody>\n"
        "  </table>\n"
        " </body>\n"
        "</html>\n";

    std::string output = _buf.str();
    std::cout << output;
    return 0; 
}

Version data entries

188 entries across 162 versions & 41 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/gems/erubis-2.7.0/test/data/users-guide/example_c.result
solidus_backend-1.0.0.pre3 vendor/bundle/gems/erubis-2.7.0/test/data/users-guide/example_c.result
solidus_backend-1.0.0.pre2 vendor/bundle/gems/erubis-2.7.0/test/data/users-guide/example_c.result
solidus_backend-1.0.0.pre vendor/bundle/gems/erubis-2.7.0/test/data/users-guide/example_c.result
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result
vagrant-cloudstack-1.1.0 vendor/bundle/gems/erubis-2.7.0/test/data/users-guide/example_c.result
erbse-0.0.1 test/data/users-guide/example_c.result
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/erubis-2.7.0/test/data/users-guide/example_c.result
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/erubis-2.7.0/test/data/users-guide/example_c.result
nanumfont-rails-0.1 vendor/bundle/ruby/2.1.0/gems/erubis-2.7.0/test/data/users-guide/example_c.result
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/erubis-2.7.0/test/data/users-guide/example_c.result
tnargav-1.3.3 vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result
challah-1.0.0 vendor/bundle/gems/erubis-2.7.0/test/data/users-guide/example_c.result
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result
tnargav-1.2.3 vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result
swipe-rails-0.0.5 vendor/bundle/gems/erubis-2.7.0/test/data/users-guide/example_c.result
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/test/data/users-guide/example_c.result