class Parlour::RbsGenerator::InterfaceNamespace
Represents an interface definition.
Public Instance Methods
describe()
click to toggle source
Returns a human-readable brief string description of this interface. @return [String]
# File lib/parlour/rbs_generator/interface_namespace.rb, line 29 def describe "Interface #{name} - #{children.length}" end
generate_rbs(indent_level, options)
click to toggle source
Generates the RBS lines for this interface.
@param indent_level [Integer] The indentation level to generate the lines at. @param options [Options] The formatting options to use. @return [Array<String>] The RBS lines, formatted as specified.
# File lib/parlour/rbs_generator/interface_namespace.rb, line 19 def generate_rbs(indent_level, options) lines = generate_comments(indent_level, options) lines << options.indented(indent_level, "interface #{name}") lines += generate_body(indent_level + 1, options) lines << options.indented(indent_level, "end") end