def ox_tag(tag=nil,&block)
      raise 'you can only set tag or a block, not both.' if tag && block

      @base_tag ||= self.to_s.split('::').last
      @ox_tag ||= case tag
      when String
        tag
      when Proc, Symbol, nil
        @tag_proc = (block || tag || :to_s).to_proc
        @tag_proc.call(@base_tag) rescue tag.to_s
      else
        raise 'you passed something weird'
      end
    end
def ox_tag(tag=nil,&block)
      raise 'you can only set tag or a block, not both.' if tag && block

      @base_tag ||= self.to_s.split('::').last
      @ox_tag ||= case tag
      when String
        tag
      when Proc, Symbol, nil
        @tag_proc = (block || tag || :to_s).to_proc
        @tag_proc.call(@base_tag) rescue tag.to_s
      else
        raise 'you passed something weird'
      end
    end
Sets the name of the XML element that represents this class. Use this
 to override the default camelcase class name.

 Example:
  class BookWithPublisher
   ox_tag 'book'
  end

 Without the ox_tag annotation, the XML mapped tag would have been 'BookWithPublisher'.

 Most xml documents have a consistent naming convention, for example, the node and
 and attribute names might appear in CamelCase. ox_tag enables you to adapt
 the oxmlk default names for this object to suit this convention.  For example,
 if I had a document like so:

  <XmlDoc>
    <MyPreciousData />
    <MoreToSee />
  </XmlDoc>

 Then I could access it's contents by defining the following class:

  class XmlDoc
    include OxMlk

    ox_tag :camelcase
    ox_elem :my_precious_data
    ox_elem :more_to_see
  end

 You may supply a block or any #to_proc-able object as the argument,
 and it will be called against the default node and attribute names before searching
 the document. Here are some example declaration:

  ox_tag :upcase
  ox_tag &:camelcase
  ox_tag {|val| val.gsub('_', '').downcase }

 See ActiveSupport::CoreExtensions::String::Inflections for more prepackaged formats