Permalink
Browse files

Get rid of the serial_number alias for sn.

serial_number is not an uncommon name for an attribute on a model, so better not to use it.
  • Loading branch information...
1 parent c4f99a4 commit f45bf0737e0c330322ed4a124bea6e33c42c286d @notahat notahat committed Jun 20, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/machinist/lathe.rb
@@ -19,8 +19,9 @@ def initialize(klass, serial_number, attributes = {})
end
# Returns a unique serial number for the object under construction.
- attr_reader :serial_number
- alias_method :sn, :serial_number
+ def sn
+ @serial_number
+ end
# Returns the object under construction.
attr_reader :object

0 comments on commit f45bf07

Please sign in to comment.