Class: Sod::Presenters::Action

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/sod/presenters/action.rb

Overview

Aids in rendering an action for display.

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ Action

Returns a new instance of Action.



18
19
20
21
# File 'lib/sod/presenters/action.rb', line 18

def initialize(record, **)
  super(**)
  @record = record
end

Instance Method Details

#colored_documentationObject



25
# File 'lib/sod/presenters/action.rb', line 25

def colored_documentation = [*ancillary, color_allows, color_default].tap(&:compact!)

#colored_handleObject



23
# File 'lib/sod/presenters/action.rb', line 23

def colored_handle = [color_aliases, argument].tap(&:compact!).join(" ")