Skip to content

Commit

Permalink
Ensure ivars are initialised
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanensari committed Apr 11, 2016
1 parent 7a01a70 commit 3d86c43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/peddler/client.rb
Expand Up @@ -53,7 +53,7 @@ def path(path = nil)

# @api private
def version(version = nil)
version ? @version = version : @version
version ? @version = version : @version ||= nil
end

# Sets an error handler
Expand Down Expand Up @@ -163,7 +163,7 @@ def on_error(&blk)

# @api private
def error_handler
@error_handler || self.class.error_handler
(@error_handler ||= nil) || self.class.error_handler
end

# @api private
Expand Down

0 comments on commit 3d86c43

Please sign in to comment.