Class: Egree::Party

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/egree/party.rb', line 3

def email
  @email
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/egree/party.rb', line 3

def name
  @name
end

#social_security_numberObject

Returns the value of attribute social_security_number.



4
5
6
# File 'lib/egree/party.rb', line 4

def social_security_number
  @social_security_number
end

Class Method Details

.new_with_attributes(attributes = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/egree/party.rb', line 6

def self.new_with_attributes attributes = {}
  party = self.new

  attributes.each do |name, value|
    assignment_method_name = "#{name}="
    party.public_send(assignment_method_name, value) if party.respond_to?(assignment_method_name)
  end

  party
end