Sha256: cf65c098ba66fc38d6ffa2682f651e09a140b3da453a353fa250b0454a41d58e

Contents?: true

Size: 427 Bytes

Versions: 16

Compression:

Stored size: 427 Bytes

Contents

module EgovUtils
  class NaturalPerson < AbstractPerson

    belongs_to :person, class_name: 'EgovUtils::Person'

    validates :firstname, :lastname, :birth_date, presence: true
    validates :birth_date, birthday: true

    def fullname
      firstname.to_s + ' ' + lastname.to_s
    end

    def to_s
      "#{fullname} (#{I18n.t(:text_born_on_at, place: birth_place, date: I18n.l(birth_date.to_date))})"
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
egov_utils-1.5.0.alpha16 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha15 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha14 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha13 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha12 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha11 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha10 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha9 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha8 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha7 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha6 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha5 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha4 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha3 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha2 app/models/egov_utils/natural_person.rb
egov_utils-1.5.0.alpha1 app/models/egov_utils/natural_person.rb