Class: HaveAPI::Fs::Components::IndexFilter

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

Constant Summary

Constants included from Help

Help::SEARCH_PATH

Instance Attribute Summary collapse

Attributes inherited from HaveAPI::Fs::Component

#atime, #context, #ctime, #mtime

Instance Method Summary collapse

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, #setup, #times, #unsaved?, #use, #writable?

Constructor Details

#initialize(resource_dir, param, filters = {}) ⇒ IndexFilter

Returns a new instance of IndexFilter.



6
7
8
9
10
11
12
# File 'lib/haveapi/fs/components/index_filter.rb', line 6

def initialize(resource_dir, param, filters = {})
  super()

  @resource_dir = resource_dir
  @param = param
  @filters = filters
end

Instance Attribute Details

#filtersObject (readonly)

Returns the value of attribute filters.



4
5
6
# File 'lib/haveapi/fs/components/index_filter.rb', line 4

def filters
  @filters
end

#paramObject (readonly)

Returns the value of attribute param.



4
5
6
# File 'lib/haveapi/fs/components/index_filter.rb', line 4

def param
  @param
end

#resource_dirObject (readonly)

Returns the value of attribute resource_dir.



4
5
6
# File 'lib/haveapi/fs/components/index_filter.rb', line 4

def resource_dir
  @resource_dir
end

Instance Method Details

#titleObject



14
15
16
# File 'lib/haveapi/fs/components/index_filter.rb', line 14

def title
  "Filter by #{@param}"
end