module Nameable

Public Instance Methods

first_name() click to toggle source
# File lib/nameable.rb, line 27
def first_name
  firstname
end
first_name=(thing) click to toggle source
# File lib/nameable.rb, line 31
def first_name=(thing)
  self.firstname=thing
end
full_name() click to toggle source
# File lib/nameable.rb, line 35
def full_name
  "#{firstname} #{lastname}"
end
proper_name() click to toggle source
# File lib/nameable.rb, line 39
def proper_name
  "#{lastname.upcase}, #{firstname}"
end
required_attributes() click to toggle source
Calls superclass method
# File lib/nameable.rb, line 10
def required_attributes
  result=defined?(super) ? super : []
  result+=required_nameable_attributes
end
required_database_fields() click to toggle source
Calls superclass method
# File lib/nameable.rb, line 15
def required_database_fields
  result=defined?(super) ? super : []
  result+=[:firstname, :lastname]
end
required_nameable_attributes() click to toggle source
# File lib/nameable.rb, line 20
def required_nameable_attributes
  [:firstname,:lastname]
end
surname() click to toggle source
# File lib/nameable.rb, line 43
def surname
  lastname
end
surname=(thing) click to toggle source
# File lib/nameable.rb, line 47
def surname=(thing)
  self.lastname=thing
end
title() click to toggle source
Calls superclass method
# File lib/nameable.rb, line 51
def title
  return super if defined?(super)
  full_name
end