Sha256: 77f3abe25bf0c430e9e636474c5ea75e02dc59dc46d3acb85a15d3f9921309cb
Contents?: true
Size: 566 Bytes
Versions: 88
Compression:
Stored size: 566 Bytes
Contents
module Spreadsheet module Compatibility ## # One of the most incisive changes in terms of meta-programming in Ruby 1.9 # is the switch from representing instance-variable names as Strings to # presenting them as Symbols. ivar_name provides compatibility. if RUBY_VERSION >= '1.9' def ivar_name symbol :"@#{symbol}" end def method_name symbol symbol.to_sym end else def ivar_name symbol "@#{symbol}" end def method_name symbol symbol.to_s end end end end
Version data entries
88 entries across 88 versions & 7 rubygems