1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/middleman-cli/fixtures/preview-server-hook-app/config.rb

22 lines
553 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
2015-11-07 12:51:19 -05:00
set :layout, false
class MyFeature < Middleman::Extension
def initialize(app, options_hash = {}, &block)
super
app.before_server do |server_information|
puts "/// #{server_information.listeners.first} ///"
puts "/// #{server_information.port} ///"
puts "/// #{server_information.server_name} ///"
puts "/// #{server_information.site_addresses.first} ///"
puts '/// ### END ### ///'
2015-11-07 12:51:19 -05:00
end
end
end
::Middleman::Extensions.register(:my_feature, MyFeature)
activate :my_feature