Class: Ea::Cli::Command::Info

Inherits:
Base
  • Object
show all
Defined in:
lib/ea/cli/command/info.rb

Overview

ea info NAME FILE — show details of one element by name.

Constant Summary collapse

COLUMNS =
%i[field value].freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Ea::Cli::Command::Base

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/ea/cli/command/info.rb', line 10

def call
  element = find_element
  unless element
    warn "Element #{name.inspect} not found"
    exit(1)
  end

  rows = build_info(element)
  formatter.render(rows, columns: COLUMNS)
end