make MechanizeCr::History
parent
1f97287eaf
commit
900d5a419a
|
@ -0,0 +1,9 @@
|
|||
require "./page"
|
||||
|
||||
class MechanizeCr::History < Array(MechanizeCr::Page)
|
||||
property :max_size
|
||||
def initialize(max_size = 100)
|
||||
@max_size = max_size
|
||||
super
|
||||
end
|
||||
end
|
|
@ -1,17 +1,18 @@
|
|||
require "uri"
|
||||
require "http/client"
|
||||
require "../cookie"
|
||||
require "../history"
|
||||
|
||||
module MechanizeCr
|
||||
module HTTP
|
||||
class Agent
|
||||
property :request_headers, :context
|
||||
property history : Array(Page)
|
||||
property history : MechanizeCr::History
|
||||
property user_agent : String
|
||||
property request_cookies : ::HTTP::Cookies
|
||||
|
||||
def initialize(@context : Mechanize | Nil = nil)
|
||||
@history = Array(Page).new
|
||||
@history = MechanizeCr::History.new
|
||||
@request_headers = ::HTTP::Headers.new
|
||||
@context = context
|
||||
@request_cookies = ::HTTP::Cookies.new
|
||||
|
|
Loading…
Reference in New Issue