~singpolyma/sgx-jmp

a0c9834b44afb7177e5175f2f6df72005b62a9e6 — Stephen Paul Weber 2 years ago b12d609
Rubocop fixes
2 files changed, 19 insertions(+), 14 deletions(-)

M .rubocop.yml
M sgx_jmp.rb
M .rubocop.yml => .rubocop.yml +3 -0
@@ 40,3 40,6 @@ Style/MultilineBlockChain:

Layout/IndentArray:
  EnforcedStyle: consistent

Style/FormatString:
  EnforcedStyle: percent

M sgx_jmp.rb => sgx_jmp.rb +16 -14
@@ 44,7 44,7 @@ class AsyncBraintree
		end

		def method_missing(m, *args)
			return super if false # cover everything for now
			return super if respond_to_missing?(m, *args)
			self.then { |o| o.public_send(m, *args) }
		end
	end


@@ 330,19 330,21 @@ command :execute?, node: "buy-credit", sessionid: nil do |iq|
				type: "fixed",
				value: "Current balance: $#{'%.2f' % balance}"
			},
			({
				var: "payment_method",
				type: "list-single",
				label: "Credit card to pay with",
				value: default_payment_method.to_s,
				required: true,
				options: payment_methods.map.with_index do |method, idx|
					{
						value: idx.to_s,
						label: "#{method.card_type} #{method.last_4}"
					}
				end
			} if payment_methods.length > 1),
			if payment_methods.length > 1
				{
					var: "payment_method",
					type: "list-single",
					label: "Credit card to pay with",
					value: default_payment_method.to_s,
					required: true,
					options: payment_methods.map.with_index do |method, idx|
						{
							value: idx.to_s,
							label: "#{method.card_type} #{method.last_4}"
						}
					end
				}
			end,
			XEP0122Field.new(
				"xs:decimal",
				range: (0..1000),