Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Commit

Permalink
Merge pull request #14 from ChalkSchools/class_methods
Browse files Browse the repository at this point in the history
move class methods to << block
  • Loading branch information
QuotableWater7 committed Jan 1, 2015
2 parents fc26792 + 69419a5 commit e3b91b9
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions lib/stink_bomb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
module StinkBomb
class StinkyCodeError < StandardError; end

def self.create(datetime, message: nil)
StinkBomb::RaiseBomb.new.trigger(datetime, message: message)
end
class << self
def create(datetime, message: nil)
StinkBomb::RaiseBomb.new.trigger(datetime, message: message)
end

def self.configuration
@configuration ||= Configuration.new
end
def configuration
@configuration ||= Configuration.new
end

def self.configure
yield configuration
end
def configure
yield configuration
end

def self.reset
@configuration = nil
def reset
@configuration = nil
end
end
end

0 comments on commit e3b91b9

Please sign in to comment.