Class: Each::Filter
- Inherits:
-
Struct
- Object
- Struct
- Each::Filter
- Defined in:
- lib/ruby-optics/each.rb
Instance Attribute Summary collapse
-
#blk ⇒ Object
Returns the value of attribute blk.
-
#focus ⇒ Object
Returns the value of attribute focus.
Instance Method Summary collapse
Instance Attribute Details
#blk ⇒ Object
Returns the value of attribute blk
8 9 10 |
# File 'lib/ruby-optics/each.rb', line 8 def blk @blk end |
#focus ⇒ Object
Returns the value of attribute focus
8 9 10 |
# File 'lib/ruby-optics/each.rb', line 8 def focus @focus end |
Instance Method Details
#call(object) ⇒ Object
9 10 11 |
# File 'lib/ruby-optics/each.rb', line 9 def call(object) blk.(focus.get(object)) end |