Class: SuperFormatter::Hct::Head

Inherits:
Struct
  • Object
show all
Defined in:
lib/super_formatter/hct/head.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



3
4
5
# File 'lib/super_formatter/hct/head.rb', line 3

def data
  @data
end

Instance Method Details

#indexesObject



4
5
6
7
8
9
10
11
# File 'lib/super_formatter/hct/head.rb', line 4

def indexes
  @indexes ||= {
    global_order_id: data.index('訂單號碼') || data.index('清單編號'),
    mobile: data.index('收貨人電話') || data.index('收貨人電話1'),
    recipient: data.index('收貨人') || data.index('收貨人名稱'),
    tracking_code: data.index('查貨號碼') || data.index('十碼貨號')
  }
end