Class: SysInfo
- Inherits:
-
Object
- Object
- SysInfo
- Defined in:
- lib/slideshow/cli/main_utils.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #dump ⇒ Object
- #dump_load_path ⇒ Object
-
#initialize(config) ⇒ SysInfo
constructor
A new instance of SysInfo.
Constructor Details
#initialize(config) ⇒ SysInfo
Returns a new instance of SysInfo.
17 18 19 |
# File 'lib/slideshow/cli/main_utils.rb', line 17 def initialize( config ) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
21 22 23 |
# File 'lib/slideshow/cli/main_utils.rb', line 21 def config @config end |
Instance Method Details
#dump ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/slideshow/cli/main_utils.rb', line 23 def dump puts <<EOS #{Slideshow.generator} Gems versions: - pakman #{Pakman::VERSION} - fetcher #{Fetcher::VERSION} - kramdown #{Kramdown::VERSION} - liquid #{Liquid::VERSION} - textutils #{TextUtils::VERSION} - logutils #{LogKernel::VERSION} - props #{Props::VERSION} - slideshow-models #{Slideshow::VERSION} - slideshow #{SlideshowCli::VERSION} Env home: #{Env.home} Slideshow config: #{config.config_dir} Slideshow cache: #{config.cache_dir} Slideshow root: #{Slideshow.root} EOS # dump Slideshow settings config.dump puts # todo: # add version for rubygems dump_load_path # helps debugging pluggin loading (e.g. Ruby 1.9.2> no longer includes ./ in load path) end |
#dump_load_path ⇒ Object
58 59 60 61 62 63 |
# File 'lib/slideshow/cli/main_utils.rb', line 58 def dump_load_path puts 'load path:' $LOAD_PATH.each_with_index do |path,i| puts " [#{i+1}] #{path}" end end |