Class: XDry::ItemPatcher
- Inherits:
-
Object
- Object
- XDry::ItemPatcher
- Defined in:
- lib/xdry/patching/item_patchers.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#patcher ⇒ Object
readonly
Returns the value of attribute patcher.
Instance Method Summary collapse
- #found? ⇒ Boolean
-
#initialize(patcher) {|@item| ... } ⇒ ItemPatcher
constructor
A new instance of ItemPatcher.
Constructor Details
#initialize(patcher) {|@item| ... } ⇒ ItemPatcher
Returns a new instance of ItemPatcher.
9 10 11 12 13 |
# File 'lib/xdry/patching/item_patchers.rb', line 9 def initialize patcher @patcher = patcher find! yield @item if block_given? && found? end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
6 7 8 |
# File 'lib/xdry/patching/item_patchers.rb', line 6 def item @item end |
#patcher ⇒ Object (readonly)
Returns the value of attribute patcher.
7 8 9 |
# File 'lib/xdry/patching/item_patchers.rb', line 7 def patcher @patcher end |
Instance Method Details
#found? ⇒ Boolean
15 16 17 |
# File 'lib/xdry/patching/item_patchers.rb', line 15 def found? not item.nil? end |