lib/ronin/formatting/extensions/text/string.rb in ronin-0.2.1 vs lib/ronin/formatting/extensions/text/string.rb in ronin-0.2.2

- old
+ new

@@ -19,25 +19,25 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #++ # -require 'ronin/chars' +require 'chars' class String # # Creates a new String by passing each character to the specified _block_ # using the given _options_. # # _options_ may include the following keys: # <tt>:included</tt>:: The set of characters that will be formated, - # defaults to <tt>Ronin::Chars.all</tt>. + # defaults to <tt>Chars.all</tt>. # <tt>:excluded</tt>:: The characters not to format. # def format_chars(options={},&block) - included = (options[:included] || Ronin::Chars.all) + included = (options[:included] || Chars.all) excluded = (options[:excluded] || []) targeted = included - excluded formatted = '' @@ -58,10 +58,10 @@ # Creates a new String by passing each byte to the specified _block_ # using the given _options_. # # _options_ may include the following keys: # <tt>:included</tt>:: The set of characters that will be formated, - # defaults to <tt>Ronin::Chars.all</tt>. + # defaults to <tt>Chars.all</tt>. # <tt>:excluded</tt>:: The characters not to format. # def format_bytes(options={},&block) format_chars(options) do |c| i = block.call(c[0])