Class: Lab42::Console::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/lab42/console/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filterObject (readonly)

Returns the value of attribute filter.



5
6
7
# File 'lib/lab42/console/runner.rb', line 5

def filter
  @filter
end

#methodObject (readonly)

Returns the value of attribute method.



5
6
7
# File 'lib/lab42/console/runner.rb', line 5

def method
  @method
end

#subjectObject (readonly)

Returns the value of attribute subject.



5
6
7
# File 'lib/lab42/console/runner.rb', line 5

def subject
  @subject
end

Instance Method Details

#fnd(*args) ⇒ Object



7
8
9
10
11
# File 'lib/lab42/console/runner.rb', line 7

def fnd(*args)
  @method = :find
  @filter = _make_filter(*args)
  run
end

#runObject



13
14
15
16
# File 'lib/lab42/console/runner.rb', line 13

def run
  subject
    .send(method, &filter)
end

#sel(*args) ⇒ Object



18
19
20
21
22
# File 'lib/lab42/console/runner.rb', line 18

def sel(*args)
  @method = :filter
  @filter = _make_filter(*args)
  run
end