Class: JapaneseAddressParser::Data::ApiMeta
- Inherits:
-
Data
- Object
- Data
- JapaneseAddressParser::Data::ApiMeta
- Defined in:
- lib/japanese_address_parser/data/api_meta.rb,
lib/japanese_address_parser/data/api_meta.rb,
sig/data.rbs
Overview
API レスポンスの meta。updated はデータの更新時刻で、町字/サブリソース取得時の
?v={apiVersion} に使う(キャッシュバスティング)。
Instance Attribute Summary collapse
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
Class Method Summary collapse
-
.from_json(hash) ⇒ ApiMeta
JSON(パース済み Hash・文字列キー)から VO を生成する Ruby 独自ヘルパ。.
- .new ⇒ instance
Instance Attribute Details
#updated ⇒ Object (readonly)
Returns the value of attribute updated
10 11 12 |
# File 'lib/japanese_address_parser/data/api_meta.rb', line 10 def updated @updated end |
Class Method Details
.from_json(hash) ⇒ ApiMeta
JSON(パース済み Hash・文字列キー)から VO を生成する Ruby 独自ヘルパ。
15 16 17 |
# File 'lib/japanese_address_parser/data/api_meta.rb', line 15 def self.from_json(hash) new(updated: hash['updated']) end |
.new ⇒ instance
86 |
# File 'sig/data.rbs', line 86
def self.new: (updated: Integer) -> instance
|