Class: DocFox::DataRequirement::Facade
- Inherits:
-
Object
- Object
- DocFox::DataRequirement::Facade
- Defined in:
- lib/doc_fox/data_requirement/facade.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#duplicable ⇒ Object
readonly
Returns the value of attribute duplicable.
-
#duplicate_of ⇒ Object
readonly
Returns the value of attribute duplicate_of.
-
#duplicates_max ⇒ Object
readonly
Returns the value of attribute duplicates_max.
-
#duplicates_min ⇒ Object
readonly
Returns the value of attribute duplicates_min.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#included ⇒ Object
readonly
Returns the value of attribute included.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#relationships ⇒ Object
readonly
Returns the value of attribute relationships.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#valid_evidence_types ⇒ Object
readonly
Returns the value of attribute valid_evidence_types.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Facade
constructor
A new instance of Facade.
Constructor Details
#initialize(hash) ⇒ Facade
Returns a new instance of Facade.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 7 def initialize(hash) @id = hash.dig('data', 'id') || hash['id'] @attributes = hash.dig('data', 'attributes') || hash['attributes'] @relationships = hash.dig('data', 'relationships') || hash['relationships'] @included = hash['included'] @created_at = attributes['created_at'] @duplicable = attributes['duplicable'] @duplicates_max = attributes['duplicates_max'] @duplicates_min = attributes['duplicates_min'] @duplicate_of = attributes['duplicate_of'] @form = attributes['form'] @name = attributes['name'] @required = attributes['required'] @slug = attributes['slug'] @updated_at = attributes['updated_at'] @valid_evidence_types = attributes['valid_evidence_types'] end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def attributes @attributes end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def created_at @created_at end |
#duplicable ⇒ Object (readonly)
Returns the value of attribute duplicable.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def duplicable @duplicable end |
#duplicate_of ⇒ Object (readonly)
Returns the value of attribute duplicate_of.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def duplicate_of @duplicate_of end |
#duplicates_max ⇒ Object (readonly)
Returns the value of attribute duplicates_max.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def duplicates_max @duplicates_max end |
#duplicates_min ⇒ Object (readonly)
Returns the value of attribute duplicates_min.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def duplicates_min @duplicates_min end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def form @form end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def id @id end |
#included ⇒ Object (readonly)
Returns the value of attribute included.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def included @included end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def name @name end |
#relationships ⇒ Object (readonly)
Returns the value of attribute relationships.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def relationships @relationships end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def required @required end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def slug @slug end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def updated_at @updated_at end |
#valid_evidence_types ⇒ Object (readonly)
Returns the value of attribute valid_evidence_types.
4 5 6 |
# File 'lib/doc_fox/data_requirement/facade.rb', line 4 def valid_evidence_types @valid_evidence_types end |