Skip to content

Commit

Permalink
fix some rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sandlerr committed Jan 15, 2016
1 parent 3583115 commit ce6eca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ rvm:
- 2.0.0
- 2.1
- 2.2
- 2.3
- 2.3.0
- jruby

sudo: false
8 changes: 5 additions & 3 deletions lib/zendesk_api/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,19 @@ def clear_cache
end

# @private
def to_ary; nil; end
def to_ary
nil
end

def respond_to_missing?(name, include_all)
Array.new.respond_to?(name, include_all)
[].respond_to?(name, include_all)
end

# Sends methods to underlying array of resources.
def method_missing(name, *args, &block)
if resource_methods.include?(name)
collection_method(name, *args, &block)
elsif Array.new.respond_to?(name, false)
elsif [].respond_to?(name, false)
array_method(name, *args, &block)
else
next_collection(name, *args, &block)
Expand Down

0 comments on commit ce6eca2

Please sign in to comment.