Skip to content

Instantly share code, notes, and snippets.

View elacalle's full-sized avatar
🎯
Focusing

Ernesto Lacalle elacalle

🎯
Focusing
  • Córdoba, Spain
View GitHub Profile
class OfficeWorker
attr_accessor :base_salary
def salary
@base_salary
end
end
class SalesWorker
attr_accessor :base_salary
class CreditPayment
attr_accessor :finance_bank
attr_accessor :payment_provider
def pay(amount)
@payment_provider.transfer(self.retrieve_finance(amount))
end
def retrieve_finance(amount)
@finance_bank.charge(amount)