Class: RBS::AST::Members::Include
- Inherits:
-
Object
- Object
- RBS::AST::Members::Include
- Defined in:
- lib/syntax_tree/rbs/members.rb
Instance Method Summary collapse
-
#format(q) ⇒ Object
Prints out an include, which looks like: include Foo.
- #pretty_print(q) ⇒ Object
Instance Method Details
#format(q) ⇒ Object
Prints out an include, which looks like: include Foo
240 241 242 243 244 245 246 247 248 |
# File 'lib/syntax_tree/rbs/members.rb', line 240 def format(q) SyntaxTree::RBS::Comment.maybe_format(q, comment) SyntaxTree::RBS::Annotations.maybe_format(q, annotations) q.group do q.text("include ") SyntaxTree::RBS::NameAndArgs.new(self).format(q) end end |
#pretty_print(q) ⇒ Object
250 251 252 253 254 255 256 |
# File 'lib/syntax_tree/rbs/members.rb', line 250 def pretty_print(q) q.group(2, "(include", ")") do SyntaxTree::RBS::Comment.maybe_pretty_print(q, comment) SyntaxTree::RBS::Annotations.maybe_pretty_print(q, annotations) q.pp(SyntaxTree::RBS::NameAndArgs.new(self)) end end |