Class: Jekyll::WebmentionIO::Config::SyndicationRule
- Inherits:
-
Object
- Object
- Jekyll::WebmentionIO::Config::SyndicationRule
- Defined in:
- lib/jekyll/config.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#fragment ⇒ Object
readonly
Returns the value of attribute fragment.
-
#response_mapping ⇒ Object
readonly
Returns the value of attribute response_mapping.
-
#shorturl ⇒ Object
readonly
Returns the value of attribute shorturl.
Instance Method Summary collapse
-
#initialize(entry) ⇒ SyndicationRule
constructor
A new instance of SyndicationRule.
Constructor Details
#initialize(entry) ⇒ SyndicationRule
Returns a new instance of SyndicationRule.
243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/jekyll/config.rb', line 243 def initialize(entry) @endpoint = entry['endpoint'] @shorturl = entry['shorturl'] @fragment = entry['fragment'] @response_mapping = {} return unless entry.key?('response_mapping') entry['response_mapping'].each do |key, pattern| @response_mapping[key] = JsonPath.new(pattern) rescue StandardError => e WebmentionIO.log 'error', "Ignoring invalid JsonPath expression #{pattern}: #{e}" end end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
241 242 243 |
# File 'lib/jekyll/config.rb', line 241 def endpoint @endpoint end |
#fragment ⇒ Object (readonly)
Returns the value of attribute fragment.
241 242 243 |
# File 'lib/jekyll/config.rb', line 241 def fragment @fragment end |
#response_mapping ⇒ Object (readonly)
Returns the value of attribute response_mapping.
241 242 243 |
# File 'lib/jekyll/config.rb', line 241 def response_mapping @response_mapping end |
#shorturl ⇒ Object (readonly)
Returns the value of attribute shorturl.
241 242 243 |
# File 'lib/jekyll/config.rb', line 241 def shorturl @shorturl end |