Silas Vedder
2 years ago
4 changed files with 48 additions and 0 deletions
@ -0,0 +1,11 @@
|
||||
Class { |
||||
#name : #BaselineOfBemblin, |
||||
#superclass : #BaselineOf, |
||||
#category : #BaselineOfBemblin |
||||
} |
||||
|
||||
{ #category : #accessing } |
||||
BaselineOfBemblin >> baseline: spec [ |
||||
<baseline> |
||||
spec for: #common do: [ spec package: 'Bemblin' ] |
||||
] |
@ -0,0 +1 @@
|
||||
Package { #name : #BaselineOfBemblin } |
@ -0,0 +1,35 @@
|
||||
Class { |
||||
#name : #BemblinDict, |
||||
#superclass : #Object, |
||||
#instVars : [ |
||||
'host', |
||||
'port', |
||||
'word' |
||||
], |
||||
#category : #Bemblin |
||||
} |
||||
|
||||
{ #category : #accessing } |
||||
BemblinDict >> getWord: aString [ |
||||
| json | |
||||
json := ZnClient new |
||||
get: 'https://' , host , ':' , port asString , '/Word/' , aString. |
||||
word := STON fromString: json |
||||
] |
||||
|
||||
{ #category : #accessing } |
||||
BemblinDict >> viewWord: aView [ |
||||
<gtView> |
||||
^ aView columnedList |
||||
title: 'Word'; |
||||
priority: 1; |
||||
items: [ {word} ]; |
||||
column: 'Word' text: [:w | w at: 'word' ]; |
||||
column: 'Translation' text: [:w | w at: 'translation' ]. |
||||
] |
||||
|
||||
{ #category : #accessing } |
||||
BemblinDict >> withHost: aString andPort: anInteger [ |
||||
host := aString. |
||||
port := anInteger |
||||
] |
Loading…
Reference in new issue