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-3.13.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.12.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.10.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman_puppet-0.0.7 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.9.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.8.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.7.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.5.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.6.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.5.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.4.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman_puppet-0.0.6 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.3.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman_puppet-0.0.5 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.2.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-2.5.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.1.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman_puppet-0.0.4 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman_puppet-0.0.3 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-3.0.0 test/unit/helpers/fake_searchables.rb