Skip to content

Instantly share code, notes, and snippets.

/*!
* jquery.addrule.js 0.0.15 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/05/12
**/
#!/usr/bin/env ruby
# Convert SASS/SCSS to Stylus
require 'sass'
class ToStylus < Sass::Tree::Visitors::Base
def visit(node)
method = "visit_#{node_name node}"
if self.respond_to?(method, true)
class WrappedObject
attr_reader :child
def initialize(child, log = nil)
@child = child
@log = log || []
@new_entry = nil
end
def record
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')