Skip to content

Instantly share code, notes, and snippets.

class Person
def initialize(name, children = [])
@children = children
@descendents = []
@name = name
end
def get_all_descendents
<html>
<head>
<style>
#wrapper{}
.box{float: left; border: 1px solid black;}
#main{width: 500px; height: 500px;}
function PoorMansGloveBox(element) {
this.element = element;
this.parentHeight = this.element.parentNode.clientHeight;
this.element.style.position = 'relative';
this.element.style.top = '0px';
this.lastPos = 0;
this.currentPos = 0;
var self = this;
this.element.addEventListener('touchstart', function(e){
self.lastPos = e.touches[0].pageY;
#showlinks
-@links.each do |link|
%p= link_to( link.title, link.url, :title => link.title, :target => '_blank' )
#linknote
%p Send this link to your friends:
%b
%a{:href => "/" } Dude
/ This works, but I am trying to put @instance_variable in the "/" and the "Dude"
class Order < ActiveRecord::Base
def processing_fee
packages_with_processing_fees = ['Package', 'FamilyPackage', 'LadiesPackage', 'CompletePackage']
fee = 0
# Only apply fee if cart contains an item with processing fees
fee = 3.00 if line_items.any? {|line_item| packages_with_processing_fees.include? line_item.item.class.to_s }
if customer