Sha256: c731212391e87f8377b86d7810c25f2f954c0e90b22b99f19b2544ac377af64d

Contents?: true

Size: 286 Bytes

Versions: 8

Compression:

Stored size: 286 Bytes

Contents

require 'active_support/core_ext'

module Quickbooks::Support::Inflection

  def underscore(obj)
    name = \
      case obj
      when Class
        obj.simple_name
      when Nokogiri::XML::Element
        obj.name
      else
        obj.to_s
      end
    name.underscore
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
quickbooks_api-0.1.7 lib/quickbooks/support/inflection.rb
quickbooks_api-0.1.6 lib/quickbooks/support/inflection.rb
quickbooks_api-0.1.5 lib/quickbooks/support/inflection.rb
quickbooks_api-0.1.4 lib/quickbooks/support/inflection.rb
quickbooks_api-0.1.3 lib/quickbooks/support/inflection.rb
quickbooks_api-0.1.2 lib/quickbooks/support/inflection.rb
quickbooks_api-0.1.1 lib/quickbooks/support/inflection.rb
quickbooks_api-0.1.0 lib/quickbooks/support/inflection.rb