Module: RTM::Topology::Modifier

Extends:
Modifier
Included in:
Modifier
Defined in:
rtm/lib/rtm/topology.rb

Overview

Manages Modifiers which may be applied to Constructs (or only to Topics?!)

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

- (#call) default (readonly)

The default modifier is #nop

Returns:

  • (#call)

    the default modifier



120
121
122
# File 'rtm/lib/rtm/topology.rb', line 120

def default
  @default
end

Instance Method Details

- (#call) best_name

The best_name Modifier returns the best name for a Construct: {|x| x.best_name}

Returns:

  • (#call)

    The best_name Modifier returns a name suitable for human consumption



104
105
106
# File 'rtm/lib/rtm/topology.rb', line 104

def best_name
  Proc.new {|x| x.best_name}
end

- (#call) nop

The nop Modifier just returns the construct given as is: {|x| x}

Returns:

  • (#call)

    The nop Modifier which is a callable object which takes one argument and returns this argument.



97
98
99
# File 'rtm/lib/rtm/topology.rb', line 97

def nop
  Proc.new {|x| x}
end

- (#call) reference

The reference Modifier returns a reference for a Construct: {|x| x.reference}

Returns:

  • (#call)

    The reference Modifier returns a name suitable for human consumption



111
112
113
# File 'rtm/lib/rtm/topology.rb', line 111

def reference
  Proc.new {|x| x.reference}
end