Module: RailsDefaults::DefaultOptions

Defined in:
lib/rails-defaults.rb

Instance Method Summary collapse

Instance Method Details

#default_optionsObject



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/rails-defaults.rb', line 103

def default_options

  options_hash= {}
  {
      Port:         :port,
      environment:  :environment,
      daemonize:    :daemonize,
      debugger:     :debugger,
      server:       :server
  }.each do |default_key,method_name|

    #puts "#{default_key}: #{::RailsDefaults.__send__(method_name)}"
    options_hash[default_key]= ::RailsDefaults.__send__ method_name

  end

  super.merge!( options_hash )

end

#serverObject



123
124
125
126
# File 'lib/rails-defaults.rb', line 123

def server
  options[:server] ||= default_options[:server]
  super
end