Skip to content

Instantly share code, notes, and snippets.

@jsuchal
Created May 12, 2015 12:35
Show Gist options
  • Save jsuchal/4fc78b47a265c6fdda58 to your computer and use it in GitHub Desktop.
Save jsuchal/4fc78b47a265c6fdda58 to your computer and use it in GitHub Desktop.
class Point < Struct.new(:x, :y)
end
# completely different file/project
class Point
def to_string
"#{x}, #{y}"
end
end
Point.new(1, 2).to_string
# => "1, 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment