Skip to content

Instantly share code, notes, and snippets.

@BrayanZ
Last active December 16, 2015 15:29
Show Gist options
  • Save BrayanZ/5456112 to your computer and use it in GitHub Desktop.
Save BrayanZ/5456112 to your computer and use it in GitHub Desktop.
class Employee
attr_writer :salary
attr_reader :salary
def initialize name, salary
@name = name
@salary = salary
end
end
employee = Employee.new("Homer", 500)
employee.salary += 500
print employee.salary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment