Skip to content

Commit

Permalink
Made correct_name method public
Browse files Browse the repository at this point in the history
  • Loading branch information
kessie2862 committed Aug 1, 2023
1 parent a65e05c commit 55c53ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Person < Nameable

def initialize(name = 'Unknown', age = nil, parent_permission: true)
super()
@id = generate_id
@id = Time.now.strftime('%Y%d%m%H%M%S%Z').to_i
@name = name
@age = age
@parent_permission = parent_permission
Expand All @@ -16,13 +16,13 @@ def can_use_services?
of_age? || @parent_permission
end

def correct_name
@name
end

private

def of_age?
@age.to_i >= 18
end

def correct_name
@name
end
end

0 comments on commit 55c53ac

Please sign in to comment.