Class: Comma::Extractor
Instance Method Summary
collapse
Constructor Details
#initialize(instance, &block) ⇒ Extractor
Returns a new instance of Extractor.
5
6
7
8
9
|
# File 'lib/comma/extractors.rb', line 5
def initialize(instance, &block)
@instance = instance
@block = block
@results = []
end
|
Instance Method Details
#id(*args, &block) ⇒ Object
16
17
18
|
# File 'lib/comma/extractors.rb', line 16
def id(*args, &block)
method_missing(:id, *args, &block)
end
|
11
12
13
14
|
# File 'lib/comma/extractors.rb', line 11
def results
instance_eval &@block
@results.map { |r| convert_to_data_value(r) }
end
|