Skip to content

Instantly share code, notes, and snippets.

Ok, so Inheritance

its not just for young white dudes waiting for their grandparents to fucking keel over at 82.

In ruby, Inheritance allows one class to inherit from another class attributes and behaviors (methods) that it didnt have before. The inheriter, much like a young white male, is the child class. The class that it inherits from, rather than being his old money grandparents, is the Parent Class. The lesson says Inheritance is designated with a < symbol, for example:

class Daughter < Father
end

Please visit new wiki for more info and tasks!

Ruby 1

  • ruby style => OOP everywhere, e.g. 2 + 2 is a call Fixnum(2).+(Fixnum(2))
  • [1,2,3].each {|n| puts n}
  • Simple classes (Fixnum, String, Float)
  • Kernel (puts, gets, p)
@appleios
appleios / yandex_arm_2_proc.c
Created February 25, 2015 11:22
yandex_arm_2_proc
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#define BATCH_SIZE 10
void calc_stat_for(char *batch, int sz, int *stat){
int i;
print_batch(batch,sz);