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_attributes(attr_list)
    attrs = attr_list.inject({}) do |result, attr|
      result[attr] = self.send(attr) if self.respond_to?(attr)
      result
    end
    self.class.new(attrs)
  end
def filter_attributes ( attr_list ) attrs = attr_list . inject ( { } ) do | result , attr | result [ attr ] = self . send ( attr ) if self . respond_to? ( attr ) result end self . class . new ( attrs ) end
We keep the values of the attributes in a hash
We keep the values of the attributes in a hash
attr_list