# Load `self` from saved data.
init from_json(game: Game, period: String, owner: GameEntity, json: JsonObject) do
+ init(game, period, owner)
var values = json.get_or_null("values")
if not values isa JsonObject then return
for k, v in values do self[k] = v.as(Int)
# * `max`: max amount refunded for this `Care` in a reclamation sheet.
# * `month_max`: max amount refunded by month.
init with_vals(id: Int, cover: Float, max, month_max: nullable Dollar) do
- self.id = id
+ init(id)
self.cover = cover
self.max = max
self.month_max = month_max
# * `max`: max amount refunded for this `Care` in a reclamation sheet.
# * `month_max`: max amount refunded by month.
init with_vals(id: Range[Int], cover: Float, max, month_max: nullable Dollar) do
- self.id = id
+ init(id)
self.cover = cover
self.max = max
self.month_max = month_max
private init native(res: NativeResources, app_package: String)
do
- self.android_resources = res.new_global_ref
- self.app_package = app_package
+ init(res.new_global_ref, app_package)
end
# Get a color from resources
# Create a new writer with the specified format.
init with_format(ostream:Writer, format: CsvFormat) do
- self.ostream = ostream
+ init(ostream)
self.format = format
end
# Create a new reader with the specified format.
init with_format(istream:Reader, format: CsvFormat) do
- self.istream = istream
+ init(istream)
self.format = format
end
# Init `self` from a `json` object.
init from_json(api: GithubAPI, repo: Repo, json: JsonObject) do
- self.api = api
- self.repo = repo
+ init(api, repo)
self.json = json
end
end
# Init `self` from a `json` object.
init from_json(api: GithubAPI, json: JsonObject) do
- self.api = api
- self.json = json
+ init(api, json)
end
# User these statistics are about.
# Init `self` from a `json` object.
init from_json(api: GithubAPI, json: JsonObject) do
- self.api = api
+ init(api)
self.json = json
end
# Creates a link with a `title` attribute.
init with_title(href: String, text: Writable, title: nullable String) do
- self.href = href
- self.text = text
+ init(href, text)
self.title = title
end
# Creates a link with a `title` attribute.
init with_subtext(level: Int, text: Writable, subtext: String) do
- self.level = level
- self.text = text
+ init(level, text)
self.subtext = subtext
end
# Create a HTML elements with the specifed type and attributes.
init with_attrs(tag: String, attrs: Map[String, String]) do
- self.tag = tag
+ init(tag)
self.attrs = attrs
end
# Create a link with a title.
init with_title(link: String, title: nullable String) do
- self.link = link
+ init(link)
self.title = title
end
end