Class: SiteWatcher::DSL::Top
- Inherits:
-
Object
- Object
- SiteWatcher::DSL::Top
- Defined in:
- lib/site_watcher.rb
Instance Attribute Summary collapse
-
#__sw_after_hooks ⇒ Object
readonly
Returns the value of attribute __sw_after_hooks.
-
#__sw_before_hooks ⇒ Object
readonly
Returns the value of attribute __sw_before_hooks.
-
#__sw_pages ⇒ Object
readonly
Returns the value of attribute __sw_pages.
Instance Method Summary collapse
- #after(&block) ⇒ Object
- #before(&block) ⇒ Object
-
#initialize ⇒ Top
constructor
A new instance of Top.
- #page(url, **opts, &block) ⇒ Object
Constructor Details
#initialize ⇒ Top
Returns a new instance of Top.
87 88 89 90 91 |
# File 'lib/site_watcher.rb', line 87 def initialize @__sw_pages = [] @__sw_before_hooks = [] @__sw_after_hooks = [] end |
Instance Attribute Details
#__sw_after_hooks ⇒ Object (readonly)
Returns the value of attribute __sw_after_hooks.
85 86 87 |
# File 'lib/site_watcher.rb', line 85 def __sw_after_hooks @__sw_after_hooks end |
#__sw_before_hooks ⇒ Object (readonly)
Returns the value of attribute __sw_before_hooks.
85 86 87 |
# File 'lib/site_watcher.rb', line 85 def __sw_before_hooks @__sw_before_hooks end |
#__sw_pages ⇒ Object (readonly)
Returns the value of attribute __sw_pages.
85 86 87 |
# File 'lib/site_watcher.rb', line 85 def __sw_pages @__sw_pages end |
Instance Method Details
#after(&block) ⇒ Object
97 98 99 |
# File 'lib/site_watcher.rb', line 97 def after(&block) @__sw_after_hooks << block end |
#before(&block) ⇒ Object
93 94 95 |
# File 'lib/site_watcher.rb', line 93 def before(&block) @__sw_before_hooks << block end |