Skip to content

Instantly share code, notes, and snippets.

View dlamichhane's full-sized avatar
🏠
Working from home

Deepak Lamichhane dlamichhane

🏠
Working from home
View GitHub Profile
@dlamichhane
dlamichhane / ruby_exception.rb
Last active March 16, 2018 10:10
Ruby Exception
module Me
LimitException = Class.new(StandardError)
LimitException2 = Class.new(StandardError)
class Sync
def self.find_me(digit)
raise LimitException if digit == 1
raise LimitException2 if digit == 2
puts digit
end