# Blog Editor extension module Middleman::Fjords class Options KEYS = [ :domain, :domain_file, :rebuild, # :no_zip, :gzip_assets, :cdn, :username, :password ] KEYS.each do |name| attr_accessor name end def initialize(options={}) options.each do |k,v| self.send(:"#{k}=", v) end end end # Setup extension class << self # Once registered def registered(app, options_hash={}, &block) options = Options.new(options_hash) yield options if block_given? options.rebuild ||= false options.domain ||= nil options.domain_file ||= nil # options.no_zip ||= false options.gzip_assets ||= false options.cdn ||= false app.set :fjords_options, options end alias :included :registered end end