Module: RubyApp::Mixins::StringExtension

Included in:
String
Defined in:
lib/ruby_app/mixins/string_extension.rb

Instance Method Summary collapse

Instance Method Details

#to_bObject



7
8
9
# File 'lib/ruby_app/mixins/string_extension.rb', line 7

def to_b
  return self =~ /(true|t|yes|y|on)/ ? true : false
end

#to_classObject



11
12
13
14
15
16
17
# File 'lib/ruby_app/mixins/string_extension.rb', line 11

def to_class
  _class = Object
  self.split('::').each do |name|
    _class = _class.const_get(name)
  end
  return _class
end