Skip to content

Instantly share code, notes, and snippets.

View BrayanZ's full-sized avatar

Brayan BrayanZ

  • 05:31 (UTC -06:00)
View GitHub Profile
interface IEmployee extends Feedable, Workable {
}
interface IWorkable {
public void work();
}
interface IFeedable{
public void eat();
}
interface IEmployee {
public void work();
public void eat();
}
class Employee implements IEmployee{
public void work() {
}
public void eat() {
// ...... eating in launch break
class Something
def initialize(a_thing)
@variable = a_thing
end
end
class Something
def initialize()
@variable = AnotherThing.new
end
end
module Tools
module Mailer
def valid_email? email
# ...
end
def send_email(from, to, message)
#
end
end
module Tools
def valid_email? email
# ...
end
def send_email(from, to, message)
#
end
def log(priority, message)
class Message
attr_reader :status
def initialize
@status = :started
end
def can_be_cancelled?
return true
end
class Message
attr_reader :status
def initialize
@status = :started
end
def cancel
@status = :canceled
end
class SMSNotification < Notification
def send
# sends a sms notification
end
end
class EmailNotification < Notification
def send
# sends an email with the notification
end