Method: Bonobo::Connection#by_tag

Defined in:
lib/bonobo/connection.rb

#by_tag(tags = []) ⇒ Object

this function filters out instances based on an array of tags tags should be an Array.



77
78
79
80
81
82
83
84
85
# File 'lib/bonobo/connection.rb', line 77

def by_tag(tags = [])
  binding.pry
  t = tags.join('&tag=')
  filter = "tag=#{t}"
  results = instances(filter)

  Log.warn 'Tag query returned no results: ' + tags.join(' ') if results.empty?
  results
end