Class: Middleman::DisqusExtension
- Inherits:
-
Extension
- Object
- Extension
- Middleman::DisqusExtension
- Defined in:
- lib/middleman-disqus/extension.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(app, options_hash = {}, &block) ⇒ DisqusExtension
constructor
A new instance of DisqusExtension.
Constructor Details
#initialize(app, options_hash = {}, &block) ⇒ DisqusExtension
Returns a new instance of DisqusExtension.
7 8 9 10 11 |
# File 'lib/middleman-disqus/extension.rb', line 7 def initialize(app, ={}, &block) super # place in class variable so helpers can access @@options = end |
Class Method Details
.options(options = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/middleman-disqus/extension.rb', line 13 def self.( = {}) = .to_hash.map do |k,obj| k =~ /^disqus_(.*)$/ ? [$1, obj] : nil end = Hash[.compact] @@options.to_h.merge().with_indifferent_access end |