Guest User

Untitled

a guest
Apr 23rd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. class Party
  2. attr_accessor :party, :name, :ideology, :country
  3.  
  4. def initialize(name, ideology, country)
  5. @party = party
  6. @name = name
  7. @ideology = ideology
  8. @country = country
  9. end
  10.  
  11. def output_party
  12. puts "The #{self.name} Party comes from #{self.country}, and is generally considered #{self.ideology}."
  13. end
  14.  
  15. end
  16.  
  17. party = Party.new(:Communist, :leftist, :Germany)
  18. party.output_party
Add Comment
Please, Sign In to add comment