Class: ShellEv::Accessibility
- Defined in:
- lib/shell_ev/models/accessibility.rb
Overview
Accessibility of the Location
Instance Attribute Summary collapse
-
#remark ⇒ String
optional Arbitrary text about restrictions of the Location.
-
#status ⇒ AccessibilityStatusEnum
Accessibility Status.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(status = SKIP, remark = SKIP) ⇒ Accessibility
constructor
A new instance of Accessibility.
Methods inherited from BaseModel
Constructor Details
#initialize(status = SKIP, remark = SKIP) ⇒ Accessibility
Returns a new instance of Accessibility.
41 42 43 44 |
# File 'lib/shell_ev/models/accessibility.rb', line 41 def initialize(status = SKIP, remark = SKIP) @status = status unless status == SKIP @remark = remark unless remark == SKIP end |
Instance Attribute Details
#remark ⇒ String
optional Arbitrary text about restrictions of the Location
18 19 20 |
# File 'lib/shell_ev/models/accessibility.rb', line 18 def remark @remark end |
#status ⇒ AccessibilityStatusEnum
Accessibility Status
14 15 16 |
# File 'lib/shell_ev/models/accessibility.rb', line 14 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/shell_ev/models/accessibility.rb', line 47 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : SKIP remark = hash.key?('remark') ? hash['remark'] : SKIP # Create object from extracted values. Accessibility.new(status, remark) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/shell_ev/models/accessibility.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['remark'] = 'remark' @_hash end |
.nullables ⇒ Object
An array for nullable fields
37 38 39 |
# File 'lib/shell_ev/models/accessibility.rb', line 37 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 34 |
# File 'lib/shell_ev/models/accessibility.rb', line 29 def self.optionals %w[ status remark ] end |