This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserInfo | |
attr_accessor :contact | |
delegate :name, :mail, :phone, to: :contact | |
def initialize(contact = nil) | |
self.contact = contact | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class Person | |
attr_accessor :name | |
def initialize(name) | |
@name = name | |
@go_out = 0 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# encoding: utf-8 | |
class Grammar | |
Pronoms = [ "je", "tu", "il/elle", "nous", "vous", "ils/elles" ] ; | |
Terminaisons_1 = [ "e", "es", "e", "ons", "ez", "ent" ] ; | |
Terminaisons_2 = [ "is", "is", "it", "issons", "issez", "issent" ] ; | |
def conjugate( verb ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
pronoms = [ "je", "tu", "il/elle", "nous", "vous", "ils/elles" ] ; | |
terminaisons_1 = [ "e", "es", "e", "ons", "ez", "ent" ] ; | |
terminaisons_2 = [ "is", "is", "it", "issons", "issez", "issent" ] ; | |
def conjugator | |
puts "Les formes du verbe " + verb + " au présent de l'indicatif sont :\n" | |
inf = verb.gsub(/.{2}$/, "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
prunelocal = !sh -c 'git branch --merged | grep -v "^*" | xargs git branch -d' | |
pruneorigin = !sh -c 'git branch -r --merged | grep \"^ origin/\" | grep -v "/master$" | sed "s/origin./:/g" | xargs git push origin' |