class Crystal::Macros::SymbolLiteral

Overview

A symbol literal.

Defined in:

compiler/crystal/macros.cr

Instance Method Summary

Instance methods inherited from class Crystal::Macros::ASTNode

!=(other : ASTNode) : BoolLiteral !=, ==(other : ASTNode) : BoolLiteral ==, class_name : StringLiteral class_name, column_number : StringLiteral | NilLiteral column_number, end_column_number : StringLiteral | NilLiteral end_column_number, end_line_number : StringLiteral | NilLiteral end_line_number, filename : StringLiteral | NilLiteral filename, id : MacroId id, is_a?(type : TypeNode) : BoolLiteral is_a?, line_number : StringLiteral | NilLiteral line_number, nil? : BoolLiteral nil?, raise(message) : NoReturn raise, stringify : StringLiteral stringify, symbolize : SymbolLiteral symbolize, warning(message : StringLiteral) : NilLiteral warning

Instance Method Detail

Similar to String#+.


[View source]
def =~(range : RegexLiteral) : BoolLiteral #

Similar to String#=~.


[View source]
def [](range : RangeLiteral) : SymbolLiteral #

Similar to String#[].


[View source]
def camelcase(*, lower : BoolLiteral = false) : SymbolLiteral #

Similar to String#camelcase.


[View source]
def capitalize : SymbolLiteral #

Similar to String#capitalize.


[View source]
def chars : ArrayLiteral(CharLiteral) #

Similar to String#chars.


[View source]
def chomp : SymbolLiteral #

Similar to String#chomp.


[View source]
def count(other : CharLiteral) : NumberLiteral #

Similar to String#count.


[View source]
def downcase : SymbolLiteral #

Similar to String#downcase.


[View source]
def empty? : BoolLiteral #

Similar to String#empty?.


[View source]
def ends_with?(other : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#ends_with?.


[View source]
def gsub(regex : RegexLiteral, replacement : StringLiteral) : SymbolLiteral #

Similar to String#gsub.


[View source]
def id : MacroId #

Returns a MacroId for this string's contents.


[View source]
def includes?(search : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#includes?.


[View source]

Similar to String#lines.


[View source]
def size : NumberLiteral #

Similar to String#size.


[View source]
def split(node : ASTNode) : ArrayLiteral(StringLiteral) #

Similar to String#split.


[View source]

Similar to String#split.


[View source]
def starts_with?(other : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#starts_with?.


[View source]
def strip : SymbolLiteral #

Similar to String#strip.


[View source]
def titleize : SymbolLiteral #

Similar to String#titleize.


[View source]
def to_i(base = 10) #

Similar to String#to_i.


[View source]
def tr(from : StringLiteral, to : StringLiteral) : SymbolLiteral #

Similar to String#tr.


[View source]
def underscore : SymbolLiteral #

Similar to String#underscore.


[View source]
def upcase : SymbolLiteral #

Similar to String#upcase.


[View source]