def hello(name, params) if params[:language] if params[:language] == :Spanish puts "Hola, #{name}!" elsif params[:language] == :French puts "Bonjour, #{name}!" end else puts "Hello, #{name}!" end end ------------------------------------------------------ class Post def title=(value) @title = value end def title @title end def body=(value) @body = value end def body @body end def display_post puts "Title:", @title print "Body:", @body end end -------------------------------------------------------- class Post attr_accessor :title, :body def initialize(args = {}) @title = args[:title] if args[:title] @body = args[:body] if args[:body] end def display_post puts "Title:", @title puts "Body:", @body end end --------------------------------------------------------- class Person attr_accessor :name def initialize(args = {}) raise "Every Person must have a name" unless args[:name] self.name = args[:name] end end class Cornellian < Person attr_accessor :net_id attr_accessor :email def initialize(args = {}) super(args) raise "Every Cornellian must have a NetID" unless args[:net_id] self.net_id = args[:net_id] end def email @email || "#{net_id}@cornell.edu" end end