Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create Haiku.body attribute
- class Haiku
- attr_reader :body
- def initialize(options)
- @body = options[:body]
- end
- end
- # test body attribute
- @haiku = Haiku.new(:body => 'This is a test haiku body')
- # display the haiku body
- puts @haiku.body
Add Comment
Please, Sign In to add comment