Module: SubDiff::Buildable Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
This module allows classes to accept a Builder object as an initializer argument and defines an attr_reader for it.
It also delegates commonly used methods to the Builder instance.
Instance Attribute Summary collapse
- #builder ⇒ Object readonly private
Class Method Summary collapse
- .included(base) ⇒ Object private
Instance Method Summary collapse
- #initialize(builder) ⇒ Object private
Instance Attribute Details
#builder ⇒ Object (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.
11 12 13 |
# File 'lib/sub_diff/buildable.rb', line 11 def builder @builder end |
Class Method Details
.included(base) ⇒ 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.
17 18 19 20 |
# File 'lib/sub_diff/buildable.rb', line 17 def self.included(base) base.extend(Forwardable) base.def_delegators(:builder, :diff_method, :differ, :string) end |
Instance Method Details
#initialize(builder) ⇒ 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.
13 14 15 |
# File 'lib/sub_diff/buildable.rb', line 13 def initialize(builder) @builder = builder end |