Class: Vimdb::Runner

Inherits:
Boson::Runner
  • Object
show all
Defined in:
lib/vimdb/runner.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) common_search_options



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/vimdb/runner.rb', line 7

def self.common_search_options
  option :reload, :type => :boolean, :desc => 'reloads items'
  option :sort, :type => :string, :desc => 'sort by field'
  option :reverse_sort, :type => :boolean
  option :ignore_case, :type => :boolean
  option :regexp, :type => :boolean, :desc => 'query is a regexp'
  option :not, :type => :boolean, :desc => 'return non-matching results'
  option :all, :type => :boolean, :desc => 'search all fields'
  option :field, :type => :string, :desc => 'field to query'
  option :tab, :type => :boolean, :desc => 'print tab-delimited table'
end

Instance Method Details

- (Object) commands(query = nil, options = {})



36
37
38
39
# File 'lib/vimdb/runner.rb', line 36

def commands(query = nil, options={})
  Vimdb.item('commands')
  search_item(query, options)
end

- (Object) info(item = nil)



42
43
44
# File 'lib/vimdb/runner.rb', line 42

def info(item = nil)
  puts Vimdb.item(item).info
end

- (Object) keys(query = nil, options = {})



22
23
24
25
# File 'lib/vimdb/runner.rb', line 22

def keys(query = nil, options={})
  Vimdb.item('keys')
  search_item(query, options)
end

- (Object) options(query = nil, opts = {})



29
30
31
32
# File 'lib/vimdb/runner.rb', line 29

def options(query = nil, opts={})
  Vimdb.item('options')
  search_item(query, opts)
end