demo/my_functions.rb
# Create tag with field_value, "empty" generates empty tag,
# missing field_value returns empty string.
Create tag with field_value, "empty" generates empty tag,
missing field_value returns empty string.
Create tag with field_value " empty " generates empty tag missing field_value returns empty string .
def create_tag( tag_name, field_value )
      return "" unless field_value
      if field_value == "empty"
        fv = nil
      else
        fv = field_value
      end
      return "<#{tag_name}>#{fv}</#{tag_name}>"
    end
def create_tag ( tag_name , field_value ) return "" unless field_value if field_value == "empty" fv = nil else fv = field_value end return "<#{tag_name}>#{fv}</#{tag_name}>" end
Create tag with field_value, "empty" generates empty tag,
missing field_value returns empty string.
Create tag with field_value " empty " generates empty tag missing field_value returns empty string .
tag_name
<not_specific>
field_value
<not_specific>