Skip to content

Commit

Permalink
Encapsulate in module
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Sep 14, 2018
1 parent 684b019 commit a2ab4b9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/stoplight.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# coding: utf-8

module Stoplight # rubocop:disable Style/Documentation
end

require 'stoplight/version'

require 'stoplight/color'
Expand Down Expand Up @@ -32,7 +28,13 @@ module Stoplight # rubocop:disable Style/Documentation
require 'stoplight/light/runnable'
require 'stoplight/light'

# @see Stoplight::Light#initialize
def Stoplight(name, &code) # rubocop:disable Style/MethodName
Stoplight::Light.new(name, &code)
module Stoplight # rubocop:disable Style/Documentation
module_function

# @see Stoplight::Light#initialize
def Stoplight(name, &code) # rubocop:disable Style/MethodName
Light.new(name, &code)
end
end

include Stoplight

0 comments on commit a2ab4b9

Please sign in to comment.