Class: PMS
- Inherits:
-
Object
- Object
- PMS
- Defined in:
- lib/pms/proxy.rb,
lib/pms.rb,
lib/pms/i18n.rb,
lib/pms/index.rb,
lib/pms/version.rb
Overview
–
#
A component of pms, Poor Man’s Search. #
#
Copyright © 2008-2014 Jens Wille #
#
Authors: #
Jens Wille <jens.wille@gmail.com> #
#
pms is free software; you can redistribute it and/or modify it under the # terms of the GNU Affero General Public License as published by the Free # Software Foundation; either version 3 of the License, or (at your option) # any later version. #
#
pms is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for # more details. #
#
You should have received a copy of the GNU Affero General Public License # along with pms. If not, see <www.gnu.org/licenses/>. #
#
++
Defined Under Namespace
Modules: Ext, I18n, Version Classes: Index, Proxy, TokenProxy
Constant Summary collapse
- VERSION =
Version.to_s
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
-
#initialize(input, options = {}) ⇒ PMS
constructor
A new instance of PMS.
- #matches ⇒ Object
- #results ⇒ Object
- #search(token = nil, &block) ⇒ Object (also: #/)
Constructor Details
#initialize(input, options = {}) ⇒ PMS
Returns a new instance of PMS.
35 36 37 38 |
# File 'lib/pms.rb', line 35 def initialize(input, = {}) @input = input @index = Index.new(input, ) end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
33 34 35 |
# File 'lib/pms.rb', line 33 def index @index end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
33 34 35 |
# File 'lib/pms.rb', line 33 def input @input end |
Instance Method Details
#matches ⇒ Object
50 51 52 |
# File 'lib/pms.rb', line 50 def matches @index.matches end |
#results ⇒ Object
46 47 48 |
# File 'lib/pms.rb', line 46 def results @index.entries end |
#search(token = nil, &block) ⇒ Object Also known as: /
40 41 42 |
# File 'lib/pms.rb', line 40 def search(token = nil, &block) token ? TokenProxy.new(self, token) : Proxy.new(self).and(&block) end |