Class: SuperFormatter::Tcat::Head

Inherits:
Struct
  • Object
show all
Defined in:
lib/super_formatter/tcat/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/tcat/head.rb', line 3

def data
  @data
end

Instance Method Details

#indexesObject



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

def indexes
  @indexes ||= {
    global_order_id: data.index("訂單編號"),
    mobile: data.index("手機(收)"),
    recipient: data.index("收件人"),
    tracking_code: data.index("託運單號")
  }
end