lib/cs/relation/sensor_relation.rb
# Find sensor by name in regular expression.
# The second argument is parameter that is usualy us in {#where where}
#
# example:
#
#    client.sensors.find_by_name(/position/, owned: true)
Find sensor by name in regular expression.
The second argument is parameter that is usualy us in {#where where}




Find sensor by name in regular expression . The second argument is parameter that is usualy us in { #where where }
def find_by_name(regex, parameters={})
        check_session!
        self.where(parameters)
        regex = /\A#{regex}\z/ if regex.kind_of?(String)
        self.select { |sensor| sensor.name =~ regex }
      end
def find_by_name ( regex , parameters = { } ) check_session! self . where ( parameters ) regex = / \A #{ regex } \z / if regex . kind_of? ( String ) self . select { | sensor | sensor . name =~ regex } end
Find sensor by name in regular expression.
Find sensor by name in regular expression .
regex
<not_specific>
parameters
<not_specific>