class Serverspec::Type::PhpConfig

Public Instance Methods

value() click to toggle source
# File lib/serverspec/type/php_config.rb, line 3
def value
  extra = '';
  extra = extra + "-c #{@options[:ini]}" if @options.has_key?(:ini)
  ret = @runner.run_command("php #{extra} -r 'echo get_cfg_var( \"#{@name}\" );'")
  val = ret.stdout
  val = val.to_i if val.match(/^\d+$/)
  val
end