Module: MyInfo::Attributes

Defined in:
lib/myinfo/helpers/attributes.rb

Overview

Attributes parsing

Constant Summary collapse

DEFAULT_VALUES =
%i[name sex race dob residentialstatus email mobileno regadd].freeze

Class Method Summary collapse

Class Method Details

.parse(attributes) ⇒ Object



8
9
10
11
12
# File 'lib/myinfo/helpers/attributes.rb', line 8

def self.parse(attributes)
  attributes ||= DEFAULT_VALUES

  attributes.is_a?(String) ? attributes : attributes.join(',')
end