Sha256: 34a68a59d98b5d0d5bbad02e620ff3537ea7cc6f5b38a3456f99d046b80b2b9d
Contents?: true
Size: 439 Bytes
Versions: 58
Compression:
Stored size: 439 Bytes
Contents
class HelloComputed class Contact attr_accessor :first_name, :last_name, :year_of_birth def initialize(attribute_map) @first_name = attribute_map[:first_name] @last_name = attribute_map[:last_name] @year_of_birth = attribute_map[:year_of_birth] end def name "#{last_name}, #{first_name}" end def age Time.now.year - year_of_birth.to_i rescue 0 end end end
Version data entries
58 entries across 58 versions & 1 rubygems