lib/api/contribution.rb in shelby-arena-api-0.3.0 vs lib/api/contribution.rb in shelby-arena-api-0.3.1
- old
+ new
@@ -27,25 +27,25 @@
end
# Constructor.
#
# @param reader (optional) The object that has the data. This can be a ContributionReader or Hash object.
- def initialize(reader = nil)
- if reader.is_a?(ContributionReader)
+ def initialize(reader = nil)
+ if reader.is_a?(ContributionReader)
initialize_from_json_object(reader.load_data['Contribution'])
- elsif reader.is_a?(Hash)
+ elsif reader.is_a?(Hash)
initialize_from_json_object(reader)
end
end
# Helper methods
def first_name_with_nickname
begin
fname = self.person_information['FirstName']
- if self.person_information['NickName'].strip != '' and
+ if self.person_information['NickName'].strip != '' and
self.person_information['NickName'].strip != fname
fname += " (#{self.person_information['NickName']})"
end
fname
rescue
@@ -63,10 +63,10 @@
end
def last_name
begin
- self.person_information['NickName']
+ self.person_information['LastName']
rescue
nil
end
end