lib/boson/science.rb in boson-more-0.2.1 vs lib/boson/science.rb in boson-more-0.2.2

- old
+ new

@@ -1,15 +1,16 @@ require 'boson/view' require 'boson/pipe' require 'boson/pipes' require 'boson/more_scientist' +require 'boson/save' +require 'boson/more_util' module Boson class OptionCommand BASIC_OPTIONS.update( :delete_options=>{:type=>:array, :desc=>'Deletes global options starting with given strings' }, - :usage_options=>{:type=>:string, :desc=>"Render options to pass to usage/help"}, :render=> {:type=>:boolean, :desc=>"Toggle a command's default rendering behavior"}) PIPE_OPTIONS = { :sort=>{:type=>:string, :desc=>"Sort by given field"}, :reverse_sort=>{:type=>:boolean, :desc=>"Reverse a given sort"}, :query=>{:type=>:hash, :desc=>"Queries fields given field:search pairs"}, @@ -146,19 +147,10 @@ def run_pretend_option(args) super @rendered = true if @global_options[:pretend] end - - def help_options - super.tap do |opts| - if @global_options[:usage_options] - opts << "--render_options=#{@global_options[:usage_options]}" - end - opts - end - end end extend Render end class Command @@ -265,9 +257,11 @@ METHODS << :render_options METHOD_CLASSES[:render_options] = Hash SCRAPEABLE_METHODS << :render_options end + if defined? CommentInspector module CommentInspector EVAL_ATTRIBUTES << :render_options + end end end