Sha256: 5dfbec2728511764f28ec4dcde44dd128ce1893d4bd1f0d211e9871080a7f7f1

Contents?: true

Size: 742 Bytes

Versions: 8

Compression:

Stored size: 742 Bytes

Contents

class AlphabeticalSearchResultRemote < AlphabeticalSearchResult
  def initialize(host, path, label, options = {})
    @host = host
    @path = path
    @label = label
    @definition = options[:definition]
    @definition_language = options[:definition_language]
    @additional_info = options[:additional_info]
  end

  def label
    if @additional_info.present?
      "#{@label} #{@additional_info}"
    else
      @label
    end
  end

  def path
    @path
  end

  def url
    URI.join(@host, @path).to_s
  end

  def definition?
    @definition.present?
  end

  def definition
    @definition
  end

  def definition_language
    @definition_language
  end

  def partial_name
    'concepts/alphabetical/search_result_remote'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
iqvoc-4.14.5 app/presenters/alphabetical_search_result_remote.rb
iqvoc-4.14.4 app/presenters/alphabetical_search_result_remote.rb
iqvoc-4.13.2 app/presenters/alphabetical_search_result_remote.rb
iqvoc-4.13.0 app/presenters/alphabetical_search_result_remote.rb
iqvoc-4.12.1 app/presenters/alphabetical_search_result_remote.rb
iqvoc-4.12.0 app/presenters/alphabetical_search_result_remote.rb
iqvoc-4.11.1 app/presenters/alphabetical_search_result_remote.rb
iqvoc-4.11.0 app/presenters/alphabetical_search_result_remote.rb