In Files

  • mrbgems/mruby-symbol-ext/mrblib/symbol.rb

Symbol

Public Instance Methods

capitalize → symbol click to toggle source

Same as sym.to_s.capitalize.intern.

 
               # File mrbgems/mruby-symbol-ext/mrblib/symbol.rb, line 26
def capitalize
  self.to_s.capitalize.intern
end
            
downcase → symbol click to toggle source

Same as sym.to_s.downcase.intern.

 
               # File mrbgems/mruby-symbol-ext/mrblib/symbol.rb, line 36
def downcase
  self.to_s.downcase.intern
end
            
empty? → true or false click to toggle source

Returns that sym is :“” or not.

 
               # File mrbgems/mruby-symbol-ext/mrblib/symbol.rb, line 56
def empty?
  self.to_s.empty?
end
            
length → integer click to toggle source

Same as sym.to_s.length.

 
               # File mrbgems/mruby-symbol-ext/mrblib/symbol.rb, line 15
def length
  self.to_s.length
end
            
Also aliased as: size
size() click to toggle source
Alias for: length
to_proc() click to toggle source
 
               # File mrbgems/mruby-symbol-ext/mrblib/symbol.rb, line 3
def to_proc
  Proc.new do |obj, *args|
    obj.send(self, *args)
  end
end
            
upcase → symbol click to toggle source

Same as sym.to_s.upcase.intern.

 
               # File mrbgems/mruby-symbol-ext/mrblib/symbol.rb, line 46
def upcase
  self.to_s.upcase.intern
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus