Skip to content

Instantly share code, notes, and snippets.

import ProductView from 'appkit/templates/products/product'
export default Ember.View.extend({
afterRenderEvent: function() {
$('.spinner .btn:first-of-type').on('click', function() {
view.incrementProperty('amount');
});
$('.spinner .btn:last-of-type').on('click', function() {
view.decrementProperty('amount');
});
class Person
attr_accessor :name, :gender, :height, :weight
def initialize(name, gender, height, weight)
@name = name
@gender = gender
@height = height
@weight = weight
end
def cry
"woooo"
class Rectangle
attr_accessor :width, :height
def initialize(width, height)
@width = width
@height = height
end
end
class Square < Rectangle
def initialize(length)
@markson
markson / composition.rb
Created May 28, 2013 21:55
composition
require 'pry'
class Car
attr_reader :model, :valve
attr_writer :passenger
def initialize(model, valve)
@model = model
@engine = Engine.new(valve)
end
def run
puts "wowowowo"
require 'pry'
class Car
attr_reader :model, :valve
def initialize(model, valve)
@model = model
@engine = Engine.new(valve)
end
def run
puts "wowowowo"
end
@markson
markson / a Test Gist file
Created May 6, 2013 11:02
This is my new Gist file
This a gist file
@markson
markson / a Test Gist file
Created May 6, 2013 11:02
This is my new Gist file
This a gist file
This is a gist
This is a gist
This is a gist