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.11.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.10.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.10.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.10.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.9.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.8.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.7.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.6.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.6.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.6.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.5.1 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.5.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.4.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.3.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.2.0 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.1.4 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.1.3 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.1.2 test/unit/helpers/fake_searchables.rb
hammer_cli_foreman-0.1.1 test/unit/helpers/fake_searchables.rb