lib/anemone/page.rb in anemone-0.0.5 vs lib/anemone/page.rb in anemone-0.0.6

- old
+ new

@@ -1,20 +1,21 @@ require 'anemone/http' require 'nokogiri' -require 'facets/ostructable' +require 'ostruct' module Anemone class Page - include OpenStructable # The URL of the page attr_reader :url # Array of distinct A tag HREFs from the page attr_reader :links #Content-type of the HTTP response attr_reader :content_type + #OpenStruct for user-stored data + attr_accessor :data #Nokogiri document for the HTML body attr_accessor :doc # Integer response code of the page attr_accessor :code # Array of redirect-aliases for the page @@ -51,12 +52,10 @@ @url = url @code = code @content_type = content_type @links = [] @aliases = [] - - #create empty storage for OpenStructable - update({}) + @data = OpenStruct.new @aliases << aka if !aka.nil? if body begin