class EBSCO::EDS::Info
Attributes
api_settings[RW]
application_settings[RW]
available_search_criteria[RW]
citation_style_settings[RW]
export_format_settings[RW]
view_result_settings[RW]
Public Class Methods
new(info, config = {})
click to toggle source
# File lib/ebsco/eds/info.rb, line 10 def initialize(info, config = {}) @results_per_page = config[:max_results_per_page] ? config[:max_results_per_page] : 100 @available_search_criteria = info['AvailableSearchCriteria'] @view_result_settings = info['ViewResultSettings'] @application_settings = info['ApplicationSettings'] @api_settings = info['ApiSettings'] @citation_style_settings = info['CitationStyleSettings'] @export_format_settings = info['ExportFormatSettings'] end
Public Instance Methods
available_actions()
click to toggle source
available_citation_exports(id = 'all')
click to toggle source
# File lib/ebsco/eds/info.rb, line 156 def available_citation_exports (id = 'all') @export_format_settings.fetch('AvailableFormats',{}).select{|item| item['Id'] == id || id == 'all'} end
available_citation_styles(id = 'all')
click to toggle source
available_expander_ids()
click to toggle source
available_expanders(id = 'all')
click to toggle source
# File lib/ebsco/eds/info.rb, line 64 def available_expanders (id = 'all') if id == 'all' @available_search_criteria.fetch('AvailableExpanders',{}) else @available_search_criteria.fetch('AvailableExpanders',{}).find{|item| item['Id'] == id} end end
available_limiter_ids()
click to toggle source
available_limiter_labels()
click to toggle source
# File lib/ebsco/eds/info.rb, line 96 def available_limiter_labels @available_search_criteria.fetch('AvailableLimiters',{}).map{|hash| hash['Label']} end
available_limiter_values(id)
click to toggle source
get an array of limiter values for a Type=multiselectvalue limiter
# File lib/ebsco/eds/info.rb, line 101 def available_limiter_values (id) _limiter = @available_search_criteria.fetch('AvailableLimiters',{}).find{|item| item['Id'] == id} if _limiter['Type'] == 'multiselectvalue' _limiter['LimiterValues'].map{|hash| hash['Value']} end end
available_limiters(id = 'all')
click to toggle source
# File lib/ebsco/eds/info.rb, line 88 def available_limiters (id = 'all') if id == 'all' @available_search_criteria.fetch('AvailableLimiters',{}) else @available_search_criteria.fetch('AvailableLimiters',{}).find{|item| item['Id'] == id} end end
available_result_list_views()
click to toggle source
# File lib/ebsco/eds/info.rb, line 172 def available_result_list_views %w{brief title detailed} end
available_search_mode_types()
click to toggle source
# File lib/ebsco/eds/info.rb, line 44 def available_search_mode_types available_search_modes.map{|hash| hash['Mode']} end
available_search_modes(mode = 'all_available')
click to toggle source
available_sorts(id = 'all')
click to toggle source
default_auto_correct()
click to toggle source
# File lib/ebsco/eds/info.rb, line 144 def default_auto_correct @available_search_criteria.fetch('AvailableDidYouMeanOptions',{}).find{|item| item['Id'] == 'AutoCorrect'}['DefaultOn'] end
default_auto_suggest()
click to toggle source
# File lib/ebsco/eds/info.rb, line 140 def default_auto_suggest @available_search_criteria.fetch('AvailableDidYouMeanOptions',{}).find{|item| item['Id'] == 'AutoSuggest'}['DefaultOn'] end
default_expander_ids()
click to toggle source
# File lib/ebsco/eds/info.rb, line 60 def default_expander_ids @available_search_criteria.fetch('AvailableExpanders',{}).select{|item| item['DefaultOn'] == 'y'}.map{|hash| hash['Id']} end
default_highlight()
click to toggle source
# File lib/ebsco/eds/info.rb, line 180 def default_highlight true end
default_include_image_quick_view()
click to toggle source
# File lib/ebsco/eds/info.rb, line 184 def default_include_image_quick_view false end
default_limiter_ids()
click to toggle source
# File lib/ebsco/eds/info.rb, line 80 def default_limiter_ids @available_search_criteria.fetch('AvailableLimiters',{}).select{|item| item['DefaultOn'] == 'y'}.map{|hash| hash['Id']} end
default_limiter_labels()
click to toggle source
# File lib/ebsco/eds/info.rb, line 84 def default_limiter_labels @available_search_criteria.fetch('AvailableLimiters',{}).select{|item| item['DefaultOn'] == 'y'}.map{|hash| hash['Label']} end
default_result_list_view()
click to toggle source
# File lib/ebsco/eds/info.rb, line 176 def default_result_list_view @view_result_settings['ResultListView'] end
default_results_per_page()
click to toggle source
default_search_mode()
click to toggle source
# File lib/ebsco/eds/info.rb, line 48 def default_search_mode @available_search_criteria.fetch('AvailableSearchModes',{}).find{|item| item['DefaultOn'] == 'y'}['Mode'] end
did_you_mean(id = 'all')
click to toggle source
get_limiter_by_label(label)
click to toggle source
# File lib/ebsco/eds/info.rb, line 108 def get_limiter_by_label (label) @available_search_criteria.fetch('AvailableLimiters',{}).find{|item| item['Label'] == label} end
max_record_jump()
click to toggle source
max_results_per_page()
click to toggle source
# File lib/ebsco/eds/info.rb, line 168 def max_results_per_page @results_per_page end
search_fields(code = 'all')
click to toggle source