Sha256: c4a794cfd12b5baa1226baeec93c4cfc2422575cf0c464732c2e619365f9050e
Contents?: true
Size: 1.07 KB
Versions: 2
Compression:
Stored size: 1.07 KB
Contents
# encoding: UTF-8 # # Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. require_relative 'base_action' module GoodData module LCM2 class HelloWorld < BaseAction DESCRIPTION = 'Print Hello World Message' PARAMS = define_params(self) do description 'Message to be printed' param :message, instance_of(Type::StringType), required: true description 'Number of Iterations' param :iterations, instance_of(Type::IntegerType), required: false, default: 1 end class << self def say(msg) puts "#{name}#say - #{msg}" end def call(params) # Check if all required parameters were passed BaseAction.check_params(PARAMS, params) say(params.message) msg = { message: params.message } results = [msg] # Return results results end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gooddata-0.6.51 | lib/gooddata/lcm/actions/hello_world.rb |
gooddata-0.6.50 | lib/gooddata/lcm/actions/hello_world.rb |