Module: Fairy::Select::Interface
- Defined in:
- lib/fairy/client/select.rb
Instance Method Summary collapse
- #grep(regexp, opts = nil) ⇒ Object
- #select(block_source, opts = nil) ⇒ Object (also: #find_all)
Instance Method Details
#grep(regexp, opts = nil) ⇒ Object
22 23 24 |
# File 'lib/fairy/client/select.rb', line 22 def grep(regexp, opts = nil) select(%{|e| /#{regexp.source}/ === e}, opts) end |
#select(block_source, opts = nil) ⇒ Object Also known as: find_all
12 13 14 15 16 17 18 |
# File 'lib/fairy/client/select.rb', line 12 def select(block_source, opts = nil) ERR::Raise ERR::CantAcceptBlock if block_given? block_source = BlockSource.new(block_source) mapper = Select.new(@fairy, opts, block_source) mapper.input=self mapper end |