Module: CrmFormatter
- Defined in:
- lib/crm_formatter.rb,
lib/crm_formatter/web.rb,
lib/crm_formatter/wrap.rb,
lib/crm_formatter/phone.rb,
lib/crm_formatter/tools.rb,
lib/crm_formatter/proper.rb,
lib/crm_formatter/address.rb,
lib/crm_formatter/version.rb,
lib/crm_formatter/extensions.rb
Overview
StartCrm.run_webs
Defined Under Namespace
Classes: Address, Extensions, Phone, Proper, Tools, Web, Wrap
Constant Summary collapse
- VERSION =
"2.65"
Class Method Summary collapse
-
.format_addresses(array_of_addresses) ⇒ Object
Takes array of address hashes, returns array of address hashes.
-
.format_phones(array_of_phones) ⇒ Object
Takes array of phone strings, returns array of phone hashes.
- .format_proper(string) ⇒ Object
-
.format_propers(array_of_propers) ⇒ Object
Takes array of proper strings, returns array of proper hashes.
-
.format_urls(array_of_urls) ⇒ Object
Takes array of url strings, returns array of url hashes.
- .format_with_report(args = {}) ⇒ Object
Class Method Details
.format_addresses(array_of_addresses) ⇒ Object
Takes array of address hashes, returns array of address hashes.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/crm_formatter.rb', line 33 def self.format_addresses(array_of_addresses) address_obj = CrmFormatter::Address.new formatted_address_hashes = array_of_addresses.map do |address_hsh| crmf_adr_hsh = { address_status: nil, full_addr: nil, full_addr_f: nil } crmf_adr_hsh.merge!(address_obj.format_full_address(address_hsh)) crmf_adr_hsh end formatted_address_hashes end |
.format_phones(array_of_phones) ⇒ Object
Takes array of phone strings, returns array of phone hashes.
45 46 47 48 49 50 51 52 |
# File 'lib/crm_formatter.rb', line 45 def self.format_phones(array_of_phones) phone_obj = CrmFormatter::Phone.new formatted_phone_hashes = array_of_phones.map do |phone| crmf_phone_hsh = phone_obj.validate_phone(phone) end formatted_phone_hashes end |
.format_proper(string) ⇒ Object
18 19 20 |
# File 'lib/crm_formatter.rb', line 18 def self.format_proper(string) crmf_proper_hsh = CrmFormatter::Proper.new.format_proper(string) end |
.format_propers(array_of_propers) ⇒ Object
Takes array of proper strings, returns array of proper hashes.
23 24 25 26 27 28 29 30 |
# File 'lib/crm_formatter.rb', line 23 def self.format_propers(array_of_propers) proper_obj = CrmFormatter::Proper.new formatted_proper_hashes = array_of_propers.map do |string| crmf_proper_hsh = proper_obj.format_proper(string) end formatted_proper_hashes end |
.format_urls(array_of_urls) ⇒ Object
Takes array of url strings, returns array of url hashes.
55 56 57 58 59 60 61 62 63 |
# File 'lib/crm_formatter.rb', line 55 def self.format_urls(array_of_urls) web_obj = CrmFormatter::Web.new formatted_url_hashes = array_of_urls.map do |url| crmf_url_hsh = { web_status: nil, url: url } crmf_url_hsh.merge!(web_obj.format_url(url)) crmf_url_hsh end end |
.format_with_report(args = {}) ⇒ Object
65 66 67 68 |
# File 'lib/crm_formatter.rb', line 65 def self.format_with_report(args={}) formatted_data = self::Wrap.new.run(args) formatted_data end |