Sha256: 0e970d3d0dc8b0c82ae809c6a2e8e9353019ea4c6e95e8aaa1e34fdc096608ca

Contents?: true

Size: 986 Bytes

Versions: 6

Compression:

Stored size: 986 Bytes

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: false

        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)
          say(params.message)

          msg = {
            message: params.message
          }
          results = [msg]

          # Return results
          results
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gooddata-1.3.3-java lib/gooddata/lcm/actions/hello_world.rb
gooddata-1.3.3 lib/gooddata/lcm/actions/hello_world.rb
gooddata-1.3.2-java lib/gooddata/lcm/actions/hello_world.rb
gooddata-1.3.2 lib/gooddata/lcm/actions/hello_world.rb
gooddata-1.3.1-java lib/gooddata/lcm/actions/hello_world.rb
gooddata-1.3.1 lib/gooddata/lcm/actions/hello_world.rb