Module: Bones
- Extended by:
- LittlePlugger
- Defined in:
- lib/bones.rb
Defined Under Namespace
Modules: App, Colors, Helpers, Plugins Classes: AnnotationExtractor, GemPackageTask
Constant Summary collapse
- PATH =
:stopdoc:
File.('../..', __FILE__) + File::SEPARATOR
- LIBPATH =
File.('..', __FILE__) + File::SEPARATOR
- VERSION =
File.read(PATH + '/version.txt').strip
- HOME =
File.(ENV['HOME'] || ENV['USERPROFILE'])
- RUBY =
'ruby'
Class Method Summary collapse
-
.config(&block) ⇒ Object
call-seq: Bones.config Bones.config { block }.
-
.help ⇒ Object
call-seq: Bones.help.
-
.libpath(*args) ⇒ Object
Returns the lib path for Mr Bones.
-
.path(*args) ⇒ Object
Returns the path for Mr Bones.
-
.version ⇒ Object
Returns the version of the Mr Bones library.
Class Method Details
.config(&block) ⇒ Object
call-seq:
Bones.config
Bones.config { block }
Returns the configuration object for setting up Mr Bones options.
69 70 71 |
# File 'lib/bones.rb', line 69 def self.config( &block ) Loquacious.configuration_for('Bones', &block) end |
.help ⇒ Object
call-seq:
Bones.help
Returns a help object that can be used to show the current Mr Bones configuration and descriptions for the various configuration attributes.
79 80 81 |
# File 'lib/bones.rb', line 79 def self.help Loquacious.help_for('Bones', :colorize => config.colorize, :nesting_nodes => false) end |
.libpath(*args) ⇒ Object
Returns the lib path for Mr Bones. If any arguments are given, they will be joined to the end of the path using File.join.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/bones.rb', line 50 def self.libpath( *args ) rv = args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten) if block_given? begin $LOAD_PATH.unshift LIBPATH rv = yield ensure $LOAD_PATH.shift end end return rv end |
.path(*args) ⇒ Object
Returns the path for Mr Bones. If any arguments are given, they will be joined to the end of the path using File.join.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/bones.rb', line 34 def self.path( *args ) rv = args.empty? ? PATH : ::File.join(PATH, args.flatten) if block_given? begin $LOAD_PATH.unshift PATH rv = yield ensure $LOAD_PATH.shift end end return rv end |
.version ⇒ Object
Returns the version of the Mr Bones library.
27 28 29 |
# File 'lib/bones.rb', line 27 def self.version VERSION end |