Skip to content

Instantly share code, notes, and snippets.

@siassaj

siassaj/try 1.rb Secret

Created July 6, 2015 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siassaj/bd77a83dee068c1931c0 to your computer and use it in GitHub Desktop.
Save siassaj/bd77a83dee068c1931c0 to your computer and use it in GitHub Desktop.
includes = CompaniesIncludes.new(query)
includes.each do |whatever| # funky enumerable object
# OR
instance = CompaniesIncludes.new(query)
instance.call
instance.data # => [<#obj1>, <#obj2>]
# OR
CompaniesIncludes.where(query) # => [<#obj1>, <#obj2>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment