Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7F41D0DF for ; Wed, 10 Oct 2012 21:42:31 +0000 (UTC) Received: (qmail 57825 invoked by uid 500); 10 Oct 2012 21:42:31 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 57807 invoked by uid 500); 10 Oct 2012 21:42:31 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 57799 invoked by uid 99); 10 Oct 2012 21:42:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2012 21:42:31 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lutter@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2012 21:42:25 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9ALg3Bf006950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Oct 2012 17:42:04 -0400 Received: from melon.watzmann.net (ovpn-113-83.phx2.redhat.com [10.3.113.83]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9ALg20B013688 for ; Wed, 10 Oct 2012 17:42:03 -0400 From: lutter@redhat.com To: dev@deltacloud.apache.org Subject: [PATCH 2/7] CIMI (Model::Base): make generated attr methods go through the [] methods Date: Wed, 10 Oct 2012 14:41:52 -0700 Message-Id: <1349905317-14381-3-git-send-email-lutter@redhat.com> In-Reply-To: <1349905317-14381-1-git-send-email-lutter@redhat.com> References: <1349905317-14381-1-git-send-email-lutter@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Virus-Checked: Checked by ClamAV on apache.org From: David Lutterkort --- server/lib/cimi/models/base.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb index bb4a055..4c9b2dc 100644 --- a/server/lib/cimi/models/base.rb +++ b/server/lib/cimi/models/base.rb @@ -143,8 +143,8 @@ class CIMI::Model::Base base_schema.add_attributes!(names, attr_klass, &block) end names.each do |name| - define_method(name) { @attribute_values[name] } - define_method(:"#{name}=") { |newval| @attribute_values[name] = newval } + define_method(name) { self[name] } + define_method(:"#{name}=") { |newval| self[name] = newval } end end -- 1.7.7.6