Skip to content

Commit

Permalink
Fix a few rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
remi committed Aug 5, 2014
1 parent 90e64b2 commit 4ce161f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'bundler/gem_tasks'

desc 'Start an IRB session with the gem'
task :console do
$:.unshift File.expand_path('..', __FILE__)
$LOAD_PATH.unshift File.expand_path('..', __FILE__)
require 'teamocil'
require 'irb'

Expand Down
4 changes: 2 additions & 2 deletions lib/teamocil/utils/closed_struct.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module Teamocil
class ClosedStruct < Struct
def initialize *args
def initialize(*args)
args = [{}] unless args.any?

args.first.each_pair do |key, value|
# Make sure we only set values to defined arguments
if members.map { |x| x.intern }.include?(key.to_sym)
self.send "#{key}=", value
send "#{key}=", value
else
raise ArgumentError, "#{self.class.name} doesn’t support the `#{key}` keyword, only #{members.join(', ')}"
end
Expand Down

0 comments on commit 4ce161f

Please sign in to comment.