Module: WellsFargo

Extended by:
WellsFargo
Included in:
WellsFargo
Defined in:
lib/wells_fargo.rb,
lib/wells_fargo/schema.rb,
lib/wells_fargo/element.rb,
lib/wells_fargo/version.rb,
lib/wells_fargo/elements/file.rb,
lib/wells_fargo/elements/name.rb,
lib/wells_fargo/elements/note.rb,
lib/wells_fargo/elements/check.rb,
lib/wells_fargo/elements/eff_dt.rb,
lib/wells_fargo/payment_manager.rb,
lib/wells_fargo/elements/bank_id.rb,
lib/wells_fargo/elements/cur_amt.rb,
lib/wells_fargo/elements/id_info.rb,
lib/wells_fargo/elements/message.rb,
lib/wells_fargo/elements/payroll.rb,
lib/wells_fargo/elements/pmt_rec.rb,
lib/wells_fargo/elements/po_info.rb,
lib/wells_fargo/elements/ra_info.rb,
lib/wells_fargo/elements/delivery.rb,
lib/wells_fargo/elements/earnings.rb,
lib/wells_fargo/elements/file_out.rb,
lib/wells_fargo/elements/ref_info.rb,
lib/wells_fargo/elements/tax_info.rb,
lib/wells_fargo/elements/amt_group.rb,
lib/wells_fargo/elements/bank_info.rb,
lib/wells_fargo/elements/date_info.rb,
lib/wells_fargo/elements/phone_num.rb,
lib/wells_fargo/elements/post_addr.rb,
lib/wells_fargo/elements/deductions.rb,
lib/wells_fargo/elements/exemptions.rb,
lib/wells_fargo/elements/pmt_detail.rb,
lib/wells_fargo/elements/rcvr_party.rb,
lib/wells_fargo/elements/dep_acct_id.rb,
lib/wells_fargo/elements/invoice_adj.rb,
lib/wells_fargo/elements/invoice_mgr.rb,
lib/wells_fargo/elements/orgnr_party.rb,
lib/wells_fargo/elements/contact_info.rb,
lib/wells_fargo/elements/doc_delivery.rb,
lib/wells_fargo/elements/invoice_info.rb,
lib/wells_fargo/elements/pmt_supp_ccr.rb,
lib/wells_fargo/elements/pmt_supp_fdm.rb,
lib/wells_fargo/elements/pmt_supp_pob.rb,
lib/wells_fargo/elements/pmt_supp_wtx.rb,
lib/wells_fargo/elements/return_party.rb,
lib/wells_fargo/elements/vendor_party.rb,
lib/wells_fargo/elements/edd_biller_id.rb,
lib/wells_fargo/elements/file_info_grp.rb,
lib/wells_fargo/elements/delivery_party.rb,
lib/wells_fargo/elements/earnings_total.rb,
lib/wells_fargo/elements/deductions_total.rb,
lib/wells_fargo/elements/rcvr_dep_acct_id.rb,
lib/wells_fargo/elements/account_reporting.rb,
lib/wells_fargo/elements/orgnr_dep_acct_id.rb,
lib/wells_fargo/elements/additional_details.rb,
lib/wells_fargo/elements/intermediary_dep_acct_id.rb

Defined Under Namespace

Modules: Schema Classes: Element, PaymentManager

Constant Summary collapse

VERSION =
"0.3.2"

Instance Method Summary collapse

Instance Method Details

#camelize(word) ⇒ Object

swiped from ActiveSupport



5
6
7
8
9
10
11
# File 'lib/wells_fargo.rb', line 5

def camelize word
  word.to_s.gsub(/\/(.?)/) {
    "::#{$1.upcase}"
  }.gsub(/(?:^|_)(.)/) {
    $1.upcase
  }
end

#underscore(word) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/wells_fargo.rb', line 13

def underscore word
  word = word.to_s.dup
  word.gsub! /([A-Z]+)([A-Z][a-z])/,'\1_\2'
  word.gsub! /([a-z\d])([A-Z])/,'\1_\2'
  word.tr! "-", "_"
  word.downcase!
  word
end