refactoring of project
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
module Tiss
|
||||
class Base
|
||||
|
||||
def initialize(args = {})
|
||||
args.each do |name, value|
|
||||
attr_name = name.to_s.underscore
|
||||
send("#{attr_name}=", value) if respond_to?("#{attr_name}=")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Person < Base
|
||||
|
||||
# tiss json properties
|
||||
attr_accessor :tiss_id,
|
||||
:oid,
|
||||
:old_tiss_ids,
|
||||
:first_name,
|
||||
:last_name,
|
||||
:gender,
|
||||
:pseudoperson,
|
||||
:preceding_titles,
|
||||
:postpositioned_titles,
|
||||
:orcid,
|
||||
:card_uri,
|
||||
:picture_uri,
|
||||
:main_phone_number,
|
||||
:main_email,
|
||||
:other_emails,
|
||||
:main_addresses,
|
||||
:employee
|
||||
|
||||
def initialize(args = {})
|
||||
super(args)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user