class Pohoda::Parsers::Adb::AddressbookType

Public Instance Methods

action_type() click to toggle source
# File lib/pohoda/parsers/adb/addressbook_type.rb, line 7
def action_type
  at 'adb:actionType'
end
action_type_attributes() click to toggle source
# File lib/pohoda/parsers/adb/addressbook_type.rb, line 11
def action_type_attributes
  attributes_at 'adb:actionType'
end
addressbook_account() click to toggle source
# File lib/pohoda/parsers/adb/addressbook_type.rb, line 19
def addressbook_account
  array_of_at(Adb::AccountItemType, ['adb:addressbookAccount', 'adb:accountItem'])
end
addressbook_gdpr() click to toggle source
# File lib/pohoda/parsers/adb/addressbook_type.rb, line 23
def addressbook_gdpr
  submodel_at(Adb::AddressbookGDPRType, 'adb:addressbookGDPR')
end
addressbook_header() click to toggle source
# File lib/pohoda/parsers/adb/addressbook_type.rb, line 15
def addressbook_header
  submodel_at(Adb::AddressbookHeaderType, 'adb:addressbookHeader')
end
print() click to toggle source
to_h() click to toggle source
# File lib/pohoda/parsers/adb/addressbook_type.rb, line 31
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:action_type] = action_type if has? 'adb:actionType'
  hash[:action_type_attributes] = action_type_attributes if has? 'adb:actionType'
  hash[:addressbook_header] = addressbook_header.to_h if has? 'adb:addressbookHeader'
  hash[:addressbook_account] = addressbook_account.map(&:to_h) if has? 'adb:addressbookAccount'
  hash[:addressbook_gdpr] = addressbook_gdpr.to_h if has? 'adb:addressbookGDPR'
  hash[:print] = print.map(&:to_h) if has? 'adb:print'

  hash
end