0.0
No commit activity in last 3 years
No release in over 3 years
code-snippets
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Introducing the Code-snippets gem

require 'code-snippets'

h = {
  filepath: '/home/james/snippets', 
  default_user: 'jrobertson',
  xsl: {
    outer: 'http://rscript.rorbuilder.info/s/open/snippets/index.xsl', 
    page: 'http://rscript.rorbuilder.info/s/open/snippets/snippets.xsl', 
    entry: 'http://rscript.rorbuilder.info/s/open/snippets/snippets_entry.xsl', 
    rss: 'http://rscript.rorbuilder.info/s/open/snippets/rss.xsl'
  }
}

snippets = CodeSnippets.new({config: h})

# return the front page
pg = snippets.page '1'

# return the front page for tag 'json'
tag_pg = snippets.tag('json', '1')

# return the front page for user 'jrobertson'
user_pg = snippets.user('jrobertson', '1')

# return the front page for user 'jrobertson' with tag 'json'
user_tag_pg = snippets.user('jrobertson', 'json','1')

# return the rss feed for the front page
rss_pg = snippets.rss</pre>

installation sudo gem install code-snippets

This gem renders the HTML, and RSS for a dynarex-usersblog system, and it also powers snippets.rorbuilder.info