Sha256: 5ff606791ec36098ee9e16acff753c3136b366b682da4c74d9d69503b3c6e683

Contents?: true

Size: 491 Bytes

Versions: 7

Compression:

Stored size: 491 Bytes

Contents

require 'time'

# Add this in eventually...
$time_zone = ''

def dti(date)
	begin
		Time.parse(date +' '+$time_zone).iso8601
	rescue => e
		e.message
	end
end

def arrf(**args)
	filter_attrs = [:attributes,:dataType,:name,:operator,:prompt,:values]
	filter_hash = {}

	filter_attrs.each do |attr|

		filter_hash[attr] = args[attr] unless args[attr].nil?
	
	end

	filter_hash
end

# alias_method :dti, :date_to_iso
# alias_method :arrf, :array_report_results_filter

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
osvc_ruby-1.6.0 lib/convenience_methods.rb
osvc_ruby-1.5.0 lib/convenience_methods.rb
osc_ruby-1.4.2 lib/convenience_methods.rb
osc_ruby-1.4.1 lib/convenience_methods.rb
osc_ruby-1.4.0 lib/convenience_methods.rb
osc_ruby-1.3.2 lib/convenience_methods.rb
osc_ruby-1.3.1 lib/convenience_methods.rb