Class: Yoda::Store::Transformers::CoreVisibility
- Inherits:
-
Object
- Object
- Yoda::Store::Transformers::CoreVisibility
- Defined in:
- lib/yoda/store/transformers/core_visibility.rb
Overview
YARD parses some kernel methods as public. This class fixes these visibilities.
Instance Attribute Summary collapse
- #patch ⇒ Objects::Patch readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(patch) ⇒ CoreVisibility
constructor
A new instance of CoreVisibility.
- #transformed_patch ⇒ Objects::Patch
Constructor Details
#initialize(patch) ⇒ CoreVisibility
Returns a new instance of CoreVisibility.
17 18 19 |
# File 'lib/yoda/store/transformers/core_visibility.rb', line 17 def initialize(patch) @patch = patch end |
Instance Attribute Details
#patch ⇒ Objects::Patch (readonly)
14 15 16 |
# File 'lib/yoda/store/transformers/core_visibility.rb', line 14 def patch @patch end |
Class Method Details
.transform(patch) ⇒ Objects::Patch
9 10 11 |
# File 'lib/yoda/store/transformers/core_visibility.rb', line 9 def self.transform(patch) new(patch).transformed_patch end |
Instance Method Details
#transformed_patch ⇒ Objects::Patch
22 23 24 25 26 27 28 29 30 |
# File 'lib/yoda/store/transformers/core_visibility.rb', line 22 def transformed_patch @transformed_patch = begin if patch.has_key?(:Kernel) create_patch else patch end end end |