Class: Jpzip::Meta
- Inherits:
-
Data
- Object
- Data
- Jpzip::Meta
- Defined in:
- lib/jpzip/types.rb
Overview
Meta is /meta.json.
Instance Attribute Summary collapse
-
#by_pref ⇒ Object
readonly
Returns the value of attribute by_pref.
-
#data_source ⇒ Object
readonly
Returns the value of attribute data_source.
-
#endpoints ⇒ Object
readonly
Returns the value of attribute endpoints.
-
#generated_at ⇒ Object
readonly
Returns the value of attribute generated_at.
-
#prefix_count ⇒ Object
readonly
Returns the value of attribute prefix_count.
-
#spec_version ⇒ Object
readonly
Returns the value of attribute spec_version.
-
#total_zipcodes ⇒ Object
readonly
Returns the value of attribute total_zipcodes.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Attribute Details
#by_pref ⇒ Object (readonly)
Returns the value of attribute by_pref
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def by_pref @by_pref end |
#data_source ⇒ Object (readonly)
Returns the value of attribute data_source
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def data_source @data_source end |
#endpoints ⇒ Object (readonly)
Returns the value of attribute endpoints
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def endpoints @endpoints end |
#generated_at ⇒ Object (readonly)
Returns the value of attribute generated_at
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def generated_at @generated_at end |
#prefix_count ⇒ Object (readonly)
Returns the value of attribute prefix_count
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def prefix_count @prefix_count end |
#spec_version ⇒ Object (readonly)
Returns the value of attribute spec_version
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def spec_version @spec_version end |
#total_zipcodes ⇒ Object (readonly)
Returns the value of attribute total_zipcodes
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def total_zipcodes @total_zipcodes end |
#version ⇒ Object (readonly)
Returns the value of attribute version
61 62 63 |
# File 'lib/jpzip/types.rb', line 61 def version @version end |
Class Method Details
.from_hash(h) ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/jpzip/types.rb', line 71 def self.from_hash(h) new( version: h["version"] || "", generated_at: h["generated_at"] || "", spec_version: h["spec_version"] || "", total_zipcodes: h["total_zipcodes"] || 0, prefix_count: h["prefix_count"] || 0, by_pref: h["by_pref"] || {}, data_source: h["data_source"] || "", endpoints: Endpoints.from_hash(h["endpoints"] || {}) ) end |