From f172d3a6eb3c78be87dc3f58786a7db78cd12fca Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 17 Feb 2013 22:52:39 -0600 Subject: Don't use deprecated form of attr The form "attr :name, true" is deprecated and causes Ruby to emit a warning in verbose mode. Using attr_{reader,writer,accessor} is more clear anyway, so do so. --- Library/Homebrew/cmd/audit.rb | 4 +--- Library/Homebrew/cmd/create.rb | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index c8ebad17a..f880db36b 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -73,9 +73,7 @@ class FormulaText end class FormulaAuditor - attr :f - attr :text - attr :problems, true + attr_reader :f, :text, :problems BUILD_TIME_DEPS = %W[ autoconf diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index 5565cfb11..9f215a0f2 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -71,12 +71,8 @@ module Homebrew extend self end class FormulaCreator - attr :url - attr :sha1 - attr :name, true - attr :version, true - attr :path, true - attr :mode, true + attr_reader :url, :sha1 + attr_accessor :name, :version, :path, :mode def url= url @url = url -- cgit v1.2.3