Class: Intercept::Decorator::Replace

Inherits:
Object
  • Object
show all
Defined in:
lib/intercept/decorator/replace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_valueObject (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