Class: Anemone::Page
- Inherits:
-
Object
- Object
- Anemone::Page
- Defined in:
- lib/staticfy/anemone_hacks.rb
Overview
Copyright © 2011 Wilker Lúcio
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Instance Method Summary collapse
-
#initialize(url, params = {}) ⇒ Page
constructor
A new instance of Page.
- #links ⇒ Object
- #local_body ⇒ Object
- #local_uri ⇒ Object
- #old_initialize ⇒ Object
Constructor Details
#initialize(url, params = {}) ⇒ Page
Returns a new instance of Page.
24 25 26 27 28 |
# File 'lib/staticfy/anemone_hacks.rb', line 24 def initialize(url, params = {}) old_initialize(url, params) @parser = factory_parser end |
Instance Method Details
#links ⇒ Object
30 31 32 |
# File 'lib/staticfy/anemone_hacks.rb', line 30 def links @links ||= @parser.fetch_links end |
#local_body ⇒ Object
34 35 36 |
# File 'lib/staticfy/anemone_hacks.rb', line 34 def local_body @parser.local_body end |
#local_uri ⇒ Object
38 39 40 |
# File 'lib/staticfy/anemone_hacks.rb', line 38 def local_uri Staticfy::Handlers.local_uri(url) end |
#old_initialize ⇒ Object
22 |
# File 'lib/staticfy/anemone_hacks.rb', line 22 alias_method :old_initialize, :initialize |