Method: Jekyll::Drivers::JsonDriver#initialize
- Defined in:
- lib/jekyll/drivers/json_driver.rb
#initialize(options) ⇒ JsonDriver
Returns a new instance of JsonDriver.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jekyll/drivers/json_driver.rb', line 9 def initialize() @url = ['url'] if !@url raise FatalException.new "'url' must be specified for json data source: #{options['name']}." end if @url !~ URI::regexp || URI(@url).scheme !~ /^http|https$/ raise FatalException.new "incorrect json data source url: #{@url}" end end |