Class: HaveAPI::Fs::Components::IndexFilterValue

Inherits:
ResourceDir show all
Defined in:
lib/haveapi/fs/components/index_filter.rb

Constant Summary

Constants included from Help

Help::SEARCH_PATH

Instance Attribute Summary

Attributes inherited from ResourceDir

#resource

Attributes inherited from HaveAPI::Fs::Component

#atime, #context, #ctime, #mtime

Instance Method Summary collapse

Methods inherited from ResourceDir

#contents, #delete, #refresh

Methods inherited from Directory

#contents, #directory?

Methods included from Help

find!, included

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

#setupObject



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

#titleObject



50
51
52
# File 'lib/haveapi/fs/components/index_filter.rb', line 50

def title
  @last.to_s
end