Class: Configurations::Maps::Blocks::Entry
- Inherits:
-
Object
- Object
- Configurations::Maps::Blocks::Entry
- Defined in:
- lib/configurations/maps/blocks.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Instance Method Summary collapse
- #evaluate!(value) ⇒ Object
-
#initialize(block) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(block) ⇒ Entry
Returns a new instance of Entry.
7 8 9 |
# File 'lib/configurations/maps/blocks.rb', line 7 def initialize(block) @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
5 6 7 |
# File 'lib/configurations/maps/blocks.rb', line 5 def block @block end |
Instance Method Details
#evaluate!(value) ⇒ Object
11 12 13 14 |
# File 'lib/configurations/maps/blocks.rb', line 11 def evaluate!(value) return value unless @block block.call(value) end |