Skip to content

Instantly share code, notes, and snippets.

@mleszcz
Last active May 12, 2018 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mleszcz/9359189d57f55cb9b5e49b27a46055b5 to your computer and use it in GitHub Desktop.
Save mleszcz/9359189d57f55cb9b5e49b27a46055b5 to your computer and use it in GitHub Desktop.
class OrderRepor
attr_accessor :attributes
def initialize(various_attributes)
@attributes = various_attributes
end
def print_out
puts "Summary title"
puts @attributes[:item_name]
puts @attributes[:total_cost]
end
end
report = OrderRepor.new(item_name: "Awesome ebike", total_cost: 2000.0)
report.print_out
# Summary title
# Awesome ebike
# 2000.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment