From f2f450ba6027c4aebfad3636ecde28dc210cd3d3 Mon Sep 17 00:00:00 2001 From: Kanezoh Date: Tue, 18 May 2021 22:10:03 +0900 Subject: [PATCH] arrange --- src/mechanize/form.cr | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mechanize/form.cr b/src/mechanize/form.cr index 37cccd1..e99d3c1 100644 --- a/src/mechanize/form.cr +++ b/src/mechanize/form.cr @@ -20,7 +20,6 @@ class MechanizeCr::Form #@encoding = node['accept-charset'] || (page && page.encoding) || nil #@ignore_encoding_error = false parse - request_data end def request_data @@ -31,7 +30,7 @@ class MechanizeCr::Form query = [] of String successful_controls = Array(MechanizeCr::FormContent::Field | MechanizeCr::FormContent::CheckBox).new fields.each do |elm| - successful_controls.push(elm) + successful_controls << elm end checkboxes.each do |elm| if elm.checked @@ -41,7 +40,7 @@ class MechanizeCr::Form end def parse - @fields = Array(MechanizeCr::FormContent::Field).new + @fields = Array(MechanizeCr::FormContent::Field).new @checkboxes = Array(MechanizeCr::FormContent::CheckBox).new @node.search("input").not_nil!.each do |node| end