Browse Source

Added Classes

master
Silas Vedder 2 years ago
parent
commit
d9431d73c1
  1. 11
      src/BaselineOfBemblin/BaselineOfBemblin.class.st
  2. 1
      src/BaselineOfBemblin/package.st
  3. 35
      src/Bemblin/BemblinDict.class.st
  4. 1
      src/Bemblin/package.st

11
src/BaselineOfBemblin/BaselineOfBemblin.class.st

@ -0,0 +1,11 @@
Class {
#name : #BaselineOfBemblin,
#superclass : #BaselineOf,
#category : #BaselineOfBemblin
}
{ #category : #accessing }
BaselineOfBemblin >> baseline: spec [
<baseline>
spec for: #common do: [ spec package: 'Bemblin' ]
]

1
src/BaselineOfBemblin/package.st

@ -0,0 +1 @@
Package { #name : #BaselineOfBemblin }

35
src/Bemblin/BemblinDict.class.st

@ -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
]

1
src/Bemblin/package.st

@ -0,0 +1 @@
Package { #name : #Bemblin }
Loading…
Cancel
Save