Class: Staticfy::Handlers::Base
- Inherits:
-
Object
- Object
- Staticfy::Handlers::Base
- Defined in:
- lib/staticfy/handlers/base.rb
Instance Method Summary collapse
- #fetch_links ⇒ Object
-
#initialize(page) ⇒ Base
constructor
A new instance of Base.
- #local_body ⇒ Object
- #local_uri ⇒ Object
-
#method_missing(name, *args) ⇒ Object
redirect calls to page, if it responds to.
Constructor Details
#initialize(page) ⇒ Base
Returns a new instance of Base.
24 25 26 |
# File 'lib/staticfy/handlers/base.rb', line 24 def initialize(page) @page = page end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
redirect calls to page, if it responds to
41 42 43 44 45 46 47 |
# File 'lib/staticfy/handlers/base.rb', line 41 def method_missing(name, *args) if @page.respond_to?(name) @page.send(name, *args) else super end end |
Instance Method Details
#fetch_links ⇒ Object
32 33 34 |
# File 'lib/staticfy/handlers/base.rb', line 32 def fetch_links [] end |
#local_body ⇒ Object
36 37 38 |
# File 'lib/staticfy/handlers/base.rb', line 36 def local_body body end |