Class: Middleman::Hatenastar::Extension
- Inherits:
-
Extension
- Object
- Extension
- Middleman::Hatenastar::Extension
- Defined in:
- lib/middleman-hatenastar/extension.rb
Instance Method Summary collapse
- #hatenastar_tag(uri: nil, title: nil, container: nil, entry_node: nil) ⇒ Object
-
#initialize(app, options_hash = {}, &block) ⇒ Extension
constructor
A new instance of Extension.
Constructor Details
#initialize(app, options_hash = {}, &block) ⇒ Extension
Returns a new instance of Extension.
13 14 15 16 17 18 19 20 21 |
# File 'lib/middleman-hatenastar/extension.rb', line 13 def initialize(app, ={}, &block) super if [:token] == nil raise ArgumentError, 'Hatenastar token is required.' end @generator = ::Middleman::Hatenastar::Generator.new() end |
Instance Method Details
#hatenastar_tag(uri: nil, title: nil, container: nil, entry_node: nil) ⇒ Object
25 26 27 |
# File 'lib/middleman-hatenastar/extension.rb', line 25 def hatenastar_tag(uri: nil, title: nil, container: nil, entry_node: nil) @generator.generate(uri: uri, title: title, container: container, entry_node: entry_node) end |