From 74325fc5a1471cb28f2e952132c56a4948598306 Mon Sep 17 00:00:00 2001 From: Kanezoh Date: Fri, 11 Jun 2021 09:40:27 +0900 Subject: [PATCH] refactor code --- src/mechanize/file.cr | 7 ------- src/mechanize/node.cr | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/mechanize/file.cr b/src/mechanize/file.cr index d072768..9fbfeec 100644 --- a/src/mechanize/file.cr +++ b/src/mechanize/file.cr @@ -6,12 +6,5 @@ class MechanizeCr::File @uri = uri @body = body @code = code - - #@full_path = false unless defined? @full_path - - #fill_header response - #extract_filename - - #yield self if block_given? end end diff --git a/src/mechanize/node.cr b/src/mechanize/node.cr index 2a5d5f7..571ef08 100644 --- a/src/mechanize/node.cr +++ b/src/mechanize/node.cr @@ -1,6 +1,5 @@ require "myhtml" - -# This is a fake node. +# This is a fake node used when sending post request. class Node < Hash(String,String) def css(str) [] of Hash(String,String) @@ -8,7 +7,7 @@ class Node < Hash(String,String) end -# This is a real Node. +# This is a real Node got from html. struct Myhtml::Node delegate :[], to: attributes delegate :[]=, to: attributes