server/lib/cimi/model/base.rb
#
# We keep the values of the attributes in a hash
#
We keep the values of the attributes in a hash
We keep the values of the attributes in a hash
def filter_by_arr_range(attr, filter)
    return self unless self.respond_to?(attr)
    filter = filter.split('-').inject { |s,e| s.to_i..e.to_i }
    self.class.new(attr => self.send(attr)[filter])
  end
def filter_by_arr_range ( attr , filter ) return self unless self . respond_to? ( attr ) filter = filter . split ( '-' ) . inject { | s , e | s . to_i .. e . to_i } self . class . new ( attr => self . send ( attr ) [ filter ] ) end
We keep the values of the attributes in a hash
We keep the values of the attributes in a hash
attr
filter