-
Notifications
You must be signed in to change notification settings - Fork 25
Ruby API
David Jeske edited this page May 17, 2017
·
2 revisions
Here is a simple demonstration of the Ruby API from the Ruby wrapper test code.
require 'neo'
h=Neo::Hdf.new
h.set_value "1","farming"
h.set_value "2","sewing"
h.set_value "3","bowling"
h.set_value "party.1","baloons"
h.set_value "party.2","noise makers"
h.set_value "party.3","telling long\nstories"
h.set_attr "party.1", "Drool", "True"
h.set_attr "party.2", "Pink", "1"
print h.dump
q=Neo::Hdf.new
q.copy "arf",h
print q.dump
h.get_attr("party.2").each_pair do |k,v|
print "party.2 attr (#{k}=#{v})\n"
end
s="This is a funny test. <?cs var:arf.1 ?>.
<?cs each:p = arf.party ?>
<?cs var:p ?>
<?cs /each ?>"
c = Neo::Cs.new q
c.parse_string(s)
print c.renderHome
News
Motivation
License
Discussion @ Yahoo Groups
Clearsilver cs XSLT
Clearsilver vs PHP
Overview
..HDF Dataset
..Template Syntax
....Expressions
....Macros
....Functions
..CGI Kit
....Config Vars
..FAQ
API
..C
..Python
..Perl
..Java
..C#
..Ruby
..node.js (external)
..PHP (external)