Class: Benry::CmdApp::MetadataRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/benry/cmdapp.rb

Instance Method Summary collapse

Constructor Details

#initialize(registry) ⇒ MetadataRenderer

Returns a new instance of MetadataRenderer.



2083
2084
2085
# File 'lib/benry/cmdapp.rb', line 2083

def initialize(registry)
  @registry = registry
end

Instance Method Details

#render_metadata(all: false) ⇒ Object



2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
# File 'lib/benry/cmdapp.rb', line 2087

def (all: false)
  #; [!gduge] renders registry data in YAML format.
  sb = []
  sb << "actions:\n"
  render_actions(all: all) {|s| sb << s }
  sb << "\n"
  sb << "aliases:\n"
  render_aliases(all: all) {|s| sb << s }
  sb << "\n"
  sb << "categories:\n"
  render_categories(all: all) {|s| sb << s }
  sb << "\n"
  sb << "abbreviations:\n"
  render_abbrevs() {|s| sb << s }
  return sb.join()
end