Class: MessagePack::IDL::AST::Element
- Inherits:
-
Object
- Object
- MessagePack::IDL::AST::Element
- Defined in:
- lib/msgpack/idl/ast.rb
Direct Known Subclasses
Application, Enum, EnumField, Field, Func, Inherit, Message, Namespace, Scope, Service, Type
Instance Method Summary collapse
Instance Method Details
#summary ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/msgpack/idl/ast.rb', line 28 def summary t = text lines = t.split("\n") return t if lines.size <= SUMMARY_LINES if lines.last == "}" (lines[0,SUMMARY_LINES-2] + [" ...", "}"]).join("\n") else (lines[0,SUMMARY_LINES-1] + [" ..."]).join("\n") end end |