Class: GoodData::LCM2::Help

Inherits:
BaseAction show all
Defined in:
lib/gooddata/lcm/actions/help.rb

Overview

Action responsible for printing bricks help

Constant Summary collapse

DESCRIPTION =
'Print Help Message'
PARAMS =
{}
BRICK_PIPELINE_SUFFIX =
/_brick_pipeline$/

Constants included from Dsl::Dsl

Dsl::Dsl::DEFAULT_OPTS, Dsl::Dsl::TYPES

Class Method Summary collapse

Methods inherited from BaseAction

check_params, without_check

Methods included from Dsl::Dsl

#define_params, #define_type, #process

Class Method Details

.call(_params) ⇒ Object



27
28
29
# File 'lib/gooddata/lcm/actions/help.rb', line 27

def call(_params)
  { results: create_help }
end

.create_helpObject



20
21
22
23
24
25
# File 'lib/gooddata/lcm/actions/help.rb', line 20

def create_help
  GoodData::Bricks::Pipeline.methods
    .grep(BRICK_PIPELINE_SUFFIX)
    .map { |method| method.to_s.sub(BRICK_PIPELINE_SUFFIX, '') }
    .map { |available_brick| { available_brick: available_brick } }
end