Skip to content

Commit e9b22ad

Browse files
committed
use include
1 parent 795e1fd commit e9b22ad

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data class SavingsAccount(val accountId: String, val amount: Int)
2+
data class CheckingAccount(val accountId: String, val amount: Int)
3+

source/fundamentals/transactions.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ and commit a changes to existing documents:
9898

9999
This example uses the following {+language+} data classes to model its documents:
100100

101-
.. code-block:: kotlin
102-
103-
data class SavingsAccount(val accountId: String, val amount: Int)
104-
data class CheckingAccount(val accountId: String, val amount: Int)
101+
.. literalinclude:: /examples/generated/TransactionsTest.snippet.data-class.kt
102+
:language: kotlin
103+
:copyable:
105104

106105
.. literalinclude:: /examples/generated/TransactionsTest.snippet.transaction.kt
107106
:language: kotlin

0 commit comments

Comments
 (0)