Class: Ducktrap::Node::Key

Inherits:
Ducktrap::Node show all
Includes:
Unary
Defined in:
lib/ducktrap/node/key.rb,
lib/ducktrap/node/key/add.rb,
lib/ducktrap/node/key/dump.rb,
lib/ducktrap/node/key/fetch.rb,
lib/ducktrap/node/key/delete.rb

Overview

Base class for ducktraps that manipulate keys

Direct Known Subclasses

Add, Delete, Dump, Fetch

Defined Under Namespace

Classes: Add, Delete, Dump, Evaluator, Fetch

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ducktrap::Node

build, #call, #inverse, #run

Methods included from PrettyDump

#pretty_dump, #pretty_inspect

Constructor Details

#initialize(operand, key) ⇒ undefined

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.

Initiaize object

Parameters:



24
25
26
27
# File 'lib/ducktrap/node/key.rb', line 24

def initialize(operand, key)
  @key = key
  super(operand)
end

Instance Attribute Details

#keyObject (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.

Return key

Returns:

  • (Object)


13
14
15
# File 'lib/ducktrap/node/key.rb', line 13

def key
  @key
end