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, doc : StringLiteral doc, doc_comment : MacroId doc_comment, 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#+.


def =~(range : RegexLiteral) : BoolLiteral #

Similar to String#=~.


def [](range : RangeLiteral) : SymbolLiteral #

Similar to String#[].


def camelcase(*, lower : BoolLiteral = false) : SymbolLiteral #

Similar to String#camelcase.


def capitalize : SymbolLiteral #

Similar to String#capitalize.


def chars : ArrayLiteral(CharLiteral) #

Similar to String#chars.


def chomp : SymbolLiteral #

Similar to String#chomp.


def count(other : CharLiteral) : NumberLiteral #

Similar to String#count.


def downcase : SymbolLiteral #

Similar to String#downcase.


def empty? : BoolLiteral #

Similar to String#empty?.


def ends_with?(other : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#ends_with?.


def gsub(regex : RegexLiteral, replacement : StringLiteral) : SymbolLiteral #

Similar to String#gsub.


def id : MacroId #

Returns a MacroId for this string's contents.


def includes?(search : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#includes?.


Similar to String#lines.


def size : NumberLiteral #

Similar to String#size.


def split(node : ASTNode) : ArrayLiteral(StringLiteral) #

Similar to String#split.


Similar to String#split.


def starts_with?(other : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#starts_with?.


def strip : SymbolLiteral #

Similar to String#strip.


def titleize : SymbolLiteral #

Similar to String#titleize.


def to_i(base = 10) #

Similar to String#to_i.


def tr(from : StringLiteral, to : StringLiteral) : SymbolLiteral #

Similar to String#tr.


def underscore : SymbolLiteral #

Similar to String#underscore.


def upcase : SymbolLiteral #

Similar to String#upcase.