Class: Unit
- Inherits:
-
MLS::Model
- Object
- ActiveRecord::Base
- MLS::Model
- Unit
- Includes:
- MLS::Avatar, MLS::Slugger
- Defined in:
- lib/mls/unit.rb
Instance Method Summary collapse
Methods included from MLS::Avatar
Instance Method Details
#name ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mls/unit.rb', line 21 def name name = "" case self.type when 'unit' name += "Unit" name += " #{self.number}" if self.number name += " (Floor #{self.floor})" if self.floor when 'floor' name += "Floor" name += " #{self.floor}" if self.floor name += " (Unit #{self.number})" if self.number when 'building' "Entire Building" end name end |
#tags ⇒ Object
17 18 19 |
# File 'lib/mls/unit.rb', line 17 def read_attribute(:tags) || [] end |