Sha256: c5644922a06f3793d283efc349adc980ddb9e0b1c3cf1a2a0efd3efe76a7510d

Contents?: true

Size: 484 Bytes

Versions: 12

Compression:

Stored size: 484 Bytes

Contents

module VoiceBase
  module Helpers
    def self.included(base)
      base.send :extend, ClassMethods
      base.send :include, InstanceMethods
    end

    module ClassMethods

      # E.g. "request_status" -> "requestStatus"
      def camelize_name(snake_cased_name)
        snake_cased_name.to_s.camelize(:lower)
      end

    end

    module InstanceMethods

      def camelize_name(snake_cased_name)
        self.class.camelize_name(snake_cased_name)
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
voicebase-client-ruby-1.3.0 lib/voicebase/helpers.rb
voicebase-client-ruby-1.2.4 lib/voicebase/helpers.rb
voicebase-client-ruby-1.2.3 lib/voicebase/helpers.rb
voicebase-client-ruby-1.2.2 lib/voicebase/helpers.rb
voicebase-client-ruby-1.2.1 lib/voicebase/helpers.rb
voicebase-client-ruby-1.2.0 lib/voicebase/helpers.rb
voicebase-client-ruby-1.1.1 lib/voicebase/helpers.rb
voicebase-client-ruby-1.1.0 lib/voicebase/helpers.rb
voicebase-client-ruby-1.0.17 lib/voicebase/helpers.rb
voicebase-client-ruby-1.0.16 lib/voicebase/helpers.rb
voicebase-client-ruby-1.0.15 lib/voicebase/helpers.rb
voicebase-client-ruby-1.0.14 lib/voicebase/helpers.rb