Class: Shale::Mapping::Descriptor::Dict Private
- Inherits:
-
Object
- Object
- Shale::Mapping::Descriptor::Dict
- Defined in:
- lib/shale/mapping/descriptor/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.
Class representing attribute mapping
Instance Attribute Summary collapse
-
#attribute ⇒ Symbol
readonly
private
Return attribute name.
-
#group ⇒ String
readonly
private
Return group name.
-
#method_from ⇒ Symbol
readonly
private
Return method symbol.
-
#method_to ⇒ Symbol
readonly
private
Return method symbol.
-
#name ⇒ String
readonly
private
Return mapping name.
-
#receiver ⇒ Symbol
readonly
private
Return receiver name.
-
#schema ⇒ Hash
readonly
private
Return schema hash.
Instance Method Summary collapse
-
#initialize(name:, attribute:, receiver:, methods:, group:, render_nil:, schema: nil) ⇒ Dict
constructor
private
Initialize instance.
-
#render_nil? ⇒ true, false
private
Check render_nil.
Constructor Details
#initialize(name:, attribute:, receiver:, methods:, group:, render_nil:, schema: nil) ⇒ 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
70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 70 def initialize(name:, attribute:, receiver:, methods:, group:, render_nil:, schema: nil) @name = name @attribute = attribute @receiver = receiver @group = group @render_nil = render_nil @schema = schema if methods @method_from = methods[:from] @method_to = methods[:to] end end |
Instance Attribute Details
#attribute ⇒ 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 attribute name
22 23 24 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 22 def attribute @attribute end |
#group ⇒ String (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 group name
50 51 52 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 50 def group @group 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 symbol
36 37 38 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 36 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 symbol
43 44 45 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 43 def method_to @method_to end |
#name ⇒ String (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 mapping name
15 16 17 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 15 def name @name end |
#receiver ⇒ 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 receiver name
29 30 31 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 29 def receiver @receiver end |
#schema ⇒ 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 schema hash
57 58 59 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 57 def schema @schema end |
Instance Method Details
#render_nil? ⇒ true, false
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.
Check render_nil
89 90 91 |
# File 'lib/shale/mapping/descriptor/dict.rb', line 89 def render_nil? @render_nil == true end |