Module: Nanoc
- Defined in:
- lib/nanoc.rb,
lib/nanoc/base.rb,
lib/nanoc/spec.rb,
lib/nanoc/version.rb,
lib/nanoc/base/error.rb,
lib/nanoc/base/feature.rb,
lib/nanoc/base/views/view.rb,
lib/nanoc/base/entities/content.rb,
lib/nanoc/base/entities/document.rb,
lib/nanoc/base/repos/data_source.rb,
lib/nanoc/base/services/executor.rb,
lib/nanoc/base/views/config_view.rb,
lib/nanoc/base/views/layout_view.rb,
lib/nanoc/base/compilation/filter.rb,
lib/nanoc/base/views/view_context.rb,
lib/nanoc/base/entities/identifier.rb,
lib/nanoc/base/views/item_rep_view.rb,
lib/nanoc/base/entities/snapshot_def.rb,
lib/nanoc/rule_dsl/recording_executor.rb,
lib/nanoc/base/views/mutable_item_view.rb,
lib/nanoc/base/views/item_with_reps_view.rb,
lib/nanoc/base/views/mutable_config_view.rb,
lib/nanoc/base/views/mutable_layout_view.rb,
lib/nanoc/base/views/item_without_reps_view.rb,
lib/nanoc/base/views/layout_collection_view.rb,
lib/nanoc/base/views/post_compile_item_view.rb,
lib/nanoc/base/views/item_rep_collection_view.rb,
lib/nanoc/base/views/mixins/document_view_mixin.rb,
lib/nanoc/base/views/mixins/with_reps_view_mixin.rb,
lib/nanoc/base/views/identifiable_collection_view.rb,
lib/nanoc/base/views/mutable_item_collection_view.rb,
lib/nanoc/base/views/item_collection_with_reps_view.rb,
lib/nanoc/base/views/mutable_layout_collection_view.rb,
lib/nanoc/base/views/item_collection_without_reps_view.rb,
lib/nanoc/base/views/post_compile_item_collection_view.rb,
lib/nanoc/base/views/mixins/mutable_document_view_mixin.rb,
lib/nanoc/base/views/mutable_identifiable_collection_view.rb
Defined Under Namespace
Modules: ArrayExtensions, CLI, DataSources, DocumentViewMixin, Extra, Feature, Filters, HashExtensions, Helpers, Int, MutableDocumentViewMixin, PathnameExtensions, RuleDSL, Spec, StringExtensions, WithRepsViewMixin Classes: ConfigView, DataSource, Error, Filter, IdentifiableCollectionView, Identifier, ItemCollectionWithRepsView, ItemCollectionWithoutRepsView, ItemRepCollectionView, ItemRepView, ItemWithRepsView, ItemWithoutRepsView, LayoutCollectionView, LayoutView, MutableConfigView, MutableIdentifiableCollectionView, MutableItemCollectionView, MutableItemView, MutableLayoutCollectionView, MutableLayoutView, PostCompileItemCollectionView, PostCompileItemView, View, ViewContext
Constant Summary collapse
- VERSION =
The current Nanoc version.
'4.2.4'.freeze
Class Method Summary collapse
-
.on_windows? ⇒ Boolean
private
True if the current platform is Windows, false otherwise.
-
.version_information ⇒ String
private
A string containing information about this Nanoc version and its environment (Ruby engine and version, Rubygems version if any).
Class Method Details
.on_windows? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns True if the current platform is Windows, false otherwise.
18 19 20 |
# File 'lib/nanoc.rb', line 18 def self.on_windows? RUBY_PLATFORM =~ /windows|bccwin|cygwin|djgpp|mingw|mswin|wince/i end |
.version_information ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns A string containing information about this Nanoc version and its environment (Ruby engine and version, Rubygems version if any).
6 7 8 9 10 11 12 13 |
# File 'lib/nanoc.rb', line 6 def self.version_information gem_info = defined?(Gem) ? "with RubyGems #{Gem::VERSION}" : 'without RubyGems' engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' res = '' res << "Nanoc #{Nanoc::VERSION} © 2007-2016 Denis Defreyne.\n" res << "Running #{engine} #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) on #{RUBY_PLATFORM} #{gem_info}.\n" res end |