Class: Shale::Mapping::Group::Dict Private

Inherits:
Object
  • Object
show all
Defined in:
lib/shale/mapping/group/dict.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.

Dict group descriptor

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_from, method_to) ⇒ Dict

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.

Initialize instance

Parameters:

  • method_from (Symbol)
  • method_to (Symbol)


37
38
39
40
41
# File 'lib/shale/mapping/group/dict.rb', line 37

def initialize(method_from, method_to)
  @method_from = method_from
  @method_to = method_to
  @dict = {}
end

Instance Attribute Details

#dictHash (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 dict hash

Returns:

  • (Hash)


29
30
31
# File 'lib/shale/mapping/group/dict.rb', line 29

def dict
  @dict
end

#method_fromSymbol (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 method_from

Returns:

  • (Symbol)


15
16
17
# File 'lib/shale/mapping/group/dict.rb', line 15

def method_from
  @method_from
end

#method_toSymbol (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 method_to

Returns:

  • (Symbol)


22
23
24
# File 'lib/shale/mapping/group/dict.rb', line 22

def method_to
  @method_to
end

Instance Method Details

#add(key, value) ⇒ Object

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.

Add key-value pair to a group

Parameters:

  • key (String)
  • value (any)


49
50
51
# File 'lib/shale/mapping/group/dict.rb', line 49

def add(key, value)
  @dict[key] = value
end