Skip to content

Instantly share code, notes, and snippets.

View shellandbull's full-sized avatar
🛰️

Mario Gintili shellandbull

🛰️
View GitHub Profile
duration = 1000;
this.transition(
this.childOf('.row.auth-strategies-container'),
this.use('explode', {
matchBy: 'data-strategy-key',
use: ['fly-to', {duration, easing: [500, 30] }]
},
{
use: ['fade', { duration: duration / 2}]
@shellandbull
shellandbull / yolo.json
Created December 10, 2015 10:41
mah-settings
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
describe Superman do
it "should absorbe the energy from the sun" do
ross = Superman.new
sun = double(:sun, {:sunbeam_energy => 10}) # This sun is a double.
ross.absorb_energy_from(sun)
expect(ross.solar_energy).to eq(60)
end
end
class Superman
def initialize
@solar_energy = 50
end
def solar_energy
@solar_energy
end
peter_pan.fly
undefined method `fly' for #<SpiderMan:0x00000101032670>
peter_pan = SpiderMan.new
peter_pan.shoot_web
=> "one cartidge less"
# But, if we call the same method on our class
# rather than creating an instance of it
> SpiderMan.shoot_web
NoMethodError: undefined method `shoot_web' for SpiderMan:Class
Class IronMan
def initialize
@jet_pack_gas = 100
end
def fly
@jet_pack_gas -= 1
"I'm flying!"
end
@shellandbull
shellandbull / 1_class.rb
Last active August 29, 2015 13:57
ruby classes
class SpiderMan
def initialize
@web_cartidge = 100
end
def shoot_web
@web_cartidge -= 1
"one cartidge less"
end