Class: Shale::Mapping::Group::Dict Private
- Inherits:
-
Object
- Object
- Shale::Mapping::Group::Dict
- 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
-
#dict ⇒ Hash
readonly
private
Return dict hash.
-
#method_from ⇒ Symbol
readonly
private
Return method_from.
-
#method_to ⇒ Symbol
readonly
private
Return method_to.
Instance Method Summary collapse
-
#add(key, value) ⇒ Object
private
Add key-value pair to a group.
-
#initialize(method_from, method_to) ⇒ Dict
constructor
private
Initialize instance.
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
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
#dict ⇒ Hash (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
29 30 31 |
# File 'lib/shale/mapping/group/dict.rb', line 29 def dict @dict end |
#method_from ⇒ Symbol (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
15 16 17 |
# File 'lib/shale/mapping/group/dict.rb', line 15 def method_from @method_from end |
#method_to ⇒ Symbol (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
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
49 50 51 |
# File 'lib/shale/mapping/group/dict.rb', line 49 def add(key, value) @dict[key] = value end |