Class: HaveAPI::Fs::Components::IndexFilterValue
- Inherits:
-
ResourceDir
- Object
- HaveAPI::Fs::Component
- Directory
- ResourceDir
- HaveAPI::Fs::Components::IndexFilterValue
- Defined in:
- lib/haveapi/fs/components/index_filter.rb
Constant Summary
Constants included from Help
Instance Attribute Summary
Attributes inherited from ResourceDir
Attributes inherited from HaveAPI::Fs::Component
#atime, #context, #ctime, #mtime
Instance Method Summary collapse
-
#initialize(resource, filters) ⇒ IndexFilterValue
constructor
A new instance of IndexFilterValue.
- #setup ⇒ Object
- #title ⇒ Object
Methods inherited from ResourceDir
Methods inherited from Directory
Methods included from Help
Methods inherited from HaveAPI::Fs::Component
#abspath, #bound=, #bound?, children_reader, component, #contents, #directory?, #executable?, #file?, #find, inherited, #invalid?, #invalidate, #parent, #path, #readable?, #reset, #times, #unsaved?, #use, #writable?
Constructor Details
#initialize(resource, filters) ⇒ IndexFilterValue
Returns a new instance of IndexFilterValue.
35 36 37 38 39 |
# File 'lib/haveapi/fs/components/index_filter.rb', line 35 def initialize(resource, filters) super(resource) @filters = filters end |
Instance Method Details
#setup ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/haveapi/fs/components/index_filter.rb', line 41 def setup super @filters.each do |k, v| @index.find(:input).find(k).write(v) @last = v end end |
#title ⇒ Object
50 51 52 |
# File 'lib/haveapi/fs/components/index_filter.rb', line 50 def title @last.to_s end |