Sha256: e60f6ede7a8973e84b8c5c3c6319ac7ac7a5a5d1b5589dca48296e55cae39207
Contents?: true
Size: 302 Bytes
Versions: 3
Compression:
Stored size: 302 Bytes
Contents
class String def to_reader self.to_sym end def to_writer "#{self}=".to_sym end def to_iv "@#{self}" end def substitute binding binding.should! :be_a, Binding return gsub(/\#\{.+?\}/) do |term| identifier = term.slice(2 .. term.size-2) binding.eval identifier end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
ruby-ext-0.2.0 | lib/ruby_ext/string.rb |
RubyExt-0.1.1 | lib/RubyExt/string.rb |
RubyExt-0.1.2 | lib/RubyExt/string.rb |