Class: Micropub::Homesteading::Router
- Inherits:
-
Object
- Object
- Micropub::Homesteading::Router
- Defined in:
- lib/micropub/homesteading/router.rb
Constant Summary collapse
- H_MAP =
{ "entry" => "note" }
Instance Attribute Summary collapse
-
#as ⇒ Object
readonly
Returns the value of attribute as.
Instance Method Summary collapse
- #h_map(h) ⇒ Object
-
#initialize(params = {}) ⇒ Router
constructor
A new instance of Router.
Constructor Details
#initialize(params = {}) ⇒ Router
Returns a new instance of Router.
7 8 9 |
# File 'lib/micropub/homesteading/router.rb', line 7 def initialize(params={}) @as = params["as"] || h_map(params["h"]) end |
Instance Attribute Details
#as ⇒ Object (readonly)
Returns the value of attribute as.
6 7 8 |
# File 'lib/micropub/homesteading/router.rb', line 6 def as @as end |
Instance Method Details
#h_map(h) ⇒ Object
11 12 13 |
# File 'lib/micropub/homesteading/router.rb', line 11 def h_map(h) H_MAP[h] end |