Skip to content

Instantly share code, notes, and snippets.

@mxriverlynn
Created September 21, 2009 19:47
Show Gist options
  • Save mxriverlynn/190503 to your computer and use it in GitHub Desktop.
Save mxriverlynn/190503 to your computer and use it in GitHub Desktop.
def build_hash_options(option_name, option_values={})
return if (option_values.length==0)
option_text = "/#{option_name}:"
option_values.each do |key, value|
option_text << "#{key}\=#{value};"
end
option_text = option_text.chop
option_text
end
def build_array_options(option_name, option_values={})
return if (option_values.length==0)
option_text = "/#{option_name}:"
option_values.each do |value|
option_text << "#{value};"
end
option_text = option_text.chop
option_text
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment