Module: Boson::OptionParser::Viewable
- Included in:
- Boson::OptionParser
- Defined in:
- lib/boson/viewable.rb
Instance Method Summary collapse
-
#default_render_options ⇒ Object
:nodoc:.
- #get_fields_and_options(fields, options) ⇒ Object
- #render_table(fields, arr, options) ⇒ Object
Instance Method Details
#default_render_options ⇒ Object
:nodoc:
36 37 38 39 |
# File 'lib/boson/viewable.rb', line 36 def #:nodoc: {:header_filter=>:capitalize, :description=>false, :filter_any=>true, :filter_classes=>{Array=>[:join, ',']}, :hide_empty=>true} end |
#get_fields_and_options(fields, options) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/boson/viewable.rb', line 29 def (fields, ) (fields << :default).uniq! if .delete(:local) || [:fields] == '*' fields, opts = super(fields, ) fields.delete(:default) if fields.include?(:default) && opts.all? {|e| e[:default].nil? } [fields, opts] end |