Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Party
- attr_accessor :party, :name, :ideology, :country
- def initialize(name, ideology, country)
- @party = party
- @name = name
- @ideology = ideology
- @country = country
- end
- def output_party
- puts "The #{self.name} Party comes from #{self.country}, and is generally considered #{self.ideology}."
- end
- end
- party = Party.new(:Communist, :leftist, :Germany)
- party.output_party
Add Comment
Please, Sign In to add comment