Class: KittyNames::Kitty

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Kitty

Returns a new instance of Kitty.



123
124
125
126
127
# File 'lib/kittynames.rb', line 123

def initialize(params)
  params.each do |key, value|
    send("#{key}=", value)
  end
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



121
122
123
# File 'lib/kittynames.rb', line 121

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



121
122
123
# File 'lib/kittynames.rb', line 121

def first_name
  @first_name
end

#genderObject

Returns the value of attribute gender.



121
122
123
# File 'lib/kittynames.rb', line 121

def gender
  @gender
end

#last_nameObject

Returns the value of attribute last_name.



121
122
123
# File 'lib/kittynames.rb', line 121

def last_name
  @last_name
end

Instance Method Details

#female?Boolean

Returns:

  • (Boolean)


133
134
135
# File 'lib/kittynames.rb', line 133

def female?
  !male?
end

#male?Boolean

Returns:

  • (Boolean)


129
130
131
# File 'lib/kittynames.rb', line 129

def male?
  gender == :male
end