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.
66 67 68 |
# File 'lib/slideshow/cli/main_utils.rb', line 66 def initialize( config ) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
70 71 72 |
# File 'lib/slideshow/cli/main_utils.rb', line 70 def config @config end |
Instance Method Details
#dump ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/slideshow/cli/main_utils.rb', line 72 def dump puts "\n\#{Slideshow.generator}\n\nGems versions:\n- pakman \#{Pakman::VERSION}\n- fetcher \#{Fetcher::VERSION}\n- markdown \#{Markdown::VERSION}\n- textutils \#{TextUtils::VERSION}\n- props \#{Props::VERSION}\n\n Env home: \#{Env.home}\nSlideshow config: \#{config.config_dir}\n Slideshow cache: \#{config.cache_dir}\nSlideshow root: \#{Slideshow.root}\n\n" # dump Slideshow settings config.dump puts # dump Markdown settings Markdown.dump puts # todo: # add verison for rubygems ## todo: add more gem version info #- redcloth #- kramdown dump_load_path # helps debugging pluggin loading (e.g. Ruby 1.9.2> no longer includes ./ in load path) end |
#dump_load_path ⇒ Object
110 111 112 113 114 115 |
# File 'lib/slideshow/cli/main_utils.rb', line 110 def dump_load_path puts 'load path:' $LOAD_PATH.each_with_index do |path,i| puts " [#{i+1}] #{path}" end end |