Sha256: 7ea03d2aeaff6d3cde33fcb4984a99ea25ca7a60205618257c5ab43ad0c77d54

Contents?: true

Size: 347 Bytes

Versions: 9

Compression:

Stored size: 347 Bytes

Contents

#!/usr/bin/env ruby
#
#  Created by Brian Marick on 2007-08-10.
#  Copyright (c) 2007. All rights reserved.


class Range # :nodoc:
  def in_words
    last_element = self.last
    last_element -= 1 if exclude_end?
    "#{self.first} to #{last_element}"
  end
end

class String # :nodoc:
  def to_inputable_sym
    gsub(/-/, '_').to_sym
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
qoobaa-user-choices-1.1.7 lib/user-choices/ruby-extensions.rb
user-choices-1.1.6.1 lib/user-choices/ruby-extensions.rb
user-choices-1.1.4 lib/user-choices/ruby-extensions.rb
user-choices-1.1.1 lib/user-choices/ruby-extensions.rb
user-choices-1.1.5 lib/user-choices/ruby-extensions.rb
user-choices-1.1.0 lib/user-choices/ruby-extensions.rb
user-choices-1.1.2 lib/user-choices/ruby-extensions.rb
user-choices-1.1.3 lib/user-choices/ruby-extensions.rb
user-choices-1.1.6 lib/user-choices/ruby-extensions.rb