Class: Uniword::Docx::UserProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/uniword/docx/profile.rb

Overview

User profile: identity → author metadata.

Maps to Word’s UserInfo registry/plist entries. Always user-supplied — no presets.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: "", initials: "", company: "", address: "", city: "", state: "", zip: "", country_region: "", phone: "", email: "") ⇒ UserProfile

Returns a new instance of UserProfile.



235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/uniword/docx/profile.rb', line 235

def initialize(name: "", initials: "", company: "",
               address: "", city: "", state: "", zip: "",
               country_region: "", phone: "", email: "")
  @name = name
  @initials = initials
  @company = company
  @address = address
  @city = city
  @state = state
  @zip = zip
  @country_region = country_region
  @phone = phone
  @email = email
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def address
  @address
end

#cityObject (readonly)

Returns the value of attribute city.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def city
  @city
end

#companyObject (readonly)

Returns the value of attribute company.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def company
  @company
end

#country_regionObject (readonly)

Returns the value of attribute country_region.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def country_region
  @country_region
end

#emailObject (readonly)

Returns the value of attribute email.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def email
  @email
end

#initialsObject (readonly)

Returns the value of attribute initials.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def initials
  @initials
end

#nameObject (readonly)

Returns the value of attribute name.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def name
  @name
end

#phoneObject (readonly)

Returns the value of attribute phone.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def phone
  @phone
end

#stateObject (readonly)

Returns the value of attribute state.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def state
  @state
end

#zipObject (readonly)

Returns the value of attribute zip.



231
232
233
# File 'lib/uniword/docx/profile.rb', line 231

def zip
  @zip
end

Class Method Details

.defaultsObject

Empty default user



251
252
253
# File 'lib/uniword/docx/profile.rb', line 251

def self.defaults
  new
end