Class: Intercept::Decorator::Replace
- Inherits:
-
Object
- Object
- Intercept::Decorator::Replace
- Defined in:
- lib/intercept/decorator/replace.rb
Instance Attribute Summary collapse
-
#replace_value ⇒ Object
readonly
Returns the value of attribute replace_value.
Instance Method Summary collapse
- #decorate(_) ⇒ Object
-
#initialize(replace_value) ⇒ Replace
constructor
A new instance of Replace.
Constructor Details
#initialize(replace_value) ⇒ Replace
8 9 10 |
# File 'lib/intercept/decorator/replace.rb', line 8 def initialize(replace_value) @replace_value = parse_replace_value replace_value end |
Instance Attribute Details
#replace_value ⇒ Object (readonly)
Returns the value of attribute replace_value.
6 7 8 |
# File 'lib/intercept/decorator/replace.rb', line 6 def replace_value @replace_value end |
Instance Method Details
#decorate(_) ⇒ Object
12 13 14 |
# File 'lib/intercept/decorator/replace.rb', line 12 def decorate(_) replace_value.call end |