Sha256: 51729b3da5fe0f6b683e9d7ea069631058b02dabee44340581cb2a12b3b22584
Contents?: true
Size: 880 Bytes
Versions: 26
Compression:
Stored size: 880 Bytes
Contents
require 'rails/generators' module BentoSearch class PullEbscoDbsGenerator < ::Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) desc "Pull avail dbs from EBSCO info task, write to source file that defines an array in ruby global variable." argument :engine_id, :type => :string class_option :output_file, :type => :string, :default => "./config/ebsco_dbs.rb", :description => "filepath to write ruby file" class_option :global_name, :type => :string, :default => "$ebsco_dbs", :description => "global variable to set in generated source file" def generate engine = BentoSearch.get_engine( engine_id ) @dbs = engine.get_info.xpath("./info/dbInfo/db") #.sort_by {|n| n["shortName"]} template("ebsco_global_var.erb", options.output_file) end end end
Version data entries
26 entries across 26 versions & 1 rubygems