Class: RfcFacil::NaturalPerson

Inherits:
Object
  • Object
show all
Defined in:
lib/rfc_facil/natural_person.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, first_last_name, second_last_name, day, month, year) ⇒ NaturalPerson

Returns a new instance of NaturalPerson.



5
6
7
8
9
10
11
12
# File 'lib/rfc_facil/natural_person.rb', line 5

def initialize(name, first_last_name, second_last_name, day, month, year)
  @name = name
  @first_last_name = first_last_name
  @second_last_name = second_last_name
  @day = day
  @month = month
  @year = year
end

Instance Attribute Details

#dayObject

Returns the value of attribute day.



3
4
5
# File 'lib/rfc_facil/natural_person.rb', line 3

def day
  @day
end

#first_last_nameObject

Returns the value of attribute first_last_name.



3
4
5
# File 'lib/rfc_facil/natural_person.rb', line 3

def first_last_name
  @first_last_name
end

#monthObject

Returns the value of attribute month.



3
4
5
# File 'lib/rfc_facil/natural_person.rb', line 3

def month
  @month
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/rfc_facil/natural_person.rb', line 3

def name
  @name
end

#second_last_nameObject

Returns the value of attribute second_last_name.



3
4
5
# File 'lib/rfc_facil/natural_person.rb', line 3

def second_last_name
  @second_last_name
end

#yearObject

Returns the value of attribute year.



3
4
5
# File 'lib/rfc_facil/natural_person.rb', line 3

def year
  @year
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/rfc_facil/natural_person.rb', line 14

def to_s
  "#{@first_last_name} #{@second_last_name} #{@name}"
end