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

Version Path
glimmer-dsl-tk-0.0.63 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.62 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.61 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.60 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.59 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.58 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.57 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.56 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.55 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.54 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.53 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.52 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.51 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.50 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.49 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.48 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.47 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.46 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.45 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.44 samples/hello/hello_computed/contact.rb