Sha256: 64b3ed8dac387aa77b4a5de12253009f6fe180c4bb4a0d6c4e6a11783e939ee2

Contents?: true

Size: 457 Bytes

Versions: 79

Compression:

Stored size: 457 Bytes

Contents


class FakeSearchables

  def initialize(searchable_fields, editable_fields = [])
    @searchables = []
    @searchables += searchable_fields.collect do |name|
      HammerCLIForeman::Searchable.new(name, "Search by #{name}", :editable => false)
    end
    @searchables += editable_fields.collect do |name|
      HammerCLIForeman::Searchable.new(name, "Search by #{name}", :editable => true)
    end
  end

  def for(resource)
    @searchables
  end

end

Version data entries

79 entries across 79 versions & 2 rubygems

Version Path
hammer_cli_foreman-0.19.3 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.19.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.18.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.19.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.18.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.19.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.17.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.18.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.17.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.17.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.15.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.16.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.15.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.15.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.14.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.13.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.13.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.13.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.12.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.12.0 test/unit/helpers/fake_searchables.rb