Class: RBS::Types::ClassSingleton

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/rbs/types.rb

Instance Method Summary collapse

Instance Method Details

#format(q) ⇒ Object



57
58
59
60
61
# File 'lib/syntax_tree/rbs/types.rb', line 57

def format(q)
  q.text("singleton(")
  name.format(q)
  q.text(")")
end

#pretty_print(q) ⇒ Object



63
64
65
66
67
68
69
# File 'lib/syntax_tree/rbs/types.rb', line 63

def pretty_print(q)
  q.group(2, "(class-singleton", ")") do
    q.breakable
    q.text("name=")
    q.pp(name)
  end
end