Class: Faker::Bot::Command Abstract Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/faker/bot/command.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This class is abstract.

interface for [Command] objects

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Command

Initialize the command

Parameters:

  • options (Hash<Symbol, String => String, Boolean>)

    The command options



33
34
35
# File 'lib/faker/bot/command.rb', line 33

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsHash<Symbol, String => String, Boolean> (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Command

options

Returns:

  • (Hash<Symbol, String => String, Boolean>)


24
25
26
# File 'lib/faker/bot/command.rb', line 24

def options
  @options
end

Instance Method Details

#render(result, output) ⇒ IO

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Render the command result into [IO]

Parameters:

  • result (Hash)

    the render tree

  • output (IO)

Returns:

  • (IO)


46
47
48
# File 'lib/faker/bot/command.rb', line 46

def render(result, output)
  Renderer.call(result, options, output)
end