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.43 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.42 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.41 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.40 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.39 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.38 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.37 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.36 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.35 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.34 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.33 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.32 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.31 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.30 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.29 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.28 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.27 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.26 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.25 samples/hello/hello_computed/contact.rb
glimmer-dsl-tk-0.0.24 samples/hello/hello_computed/contact.rb