Class: Rafflesia::QueryAdmissionSummary
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::QueryAdmissionSummary
- Defined in:
- lib/rafflesia/query/query_admission_summary.rb
Constant Summary collapse
- HASH_ATTRS =
{ admitted_count: :admitted_count, blockers: :blockers, is_executable: :is_executable, join_count: :join_count, object: :object, refused_count: :refused_count, repair_commands: :repair_commands }.freeze
Instance Attribute Summary collapse
-
#admitted_count ⇒ Object
Returns the value of attribute admitted_count.
-
#blockers ⇒ Object
Returns the value of attribute blockers.
-
#is_executable ⇒ Object
Returns the value of attribute is_executable.
-
#join_count ⇒ Object
Returns the value of attribute join_count.
-
#object ⇒ Object
Returns the value of attribute object.
-
#refused_count ⇒ Object
Returns the value of attribute refused_count.
-
#repair_commands ⇒ Object
Returns the value of attribute repair_commands.
Instance Method Summary collapse
-
#initialize(json) ⇒ QueryAdmissionSummary
constructor
A new instance of QueryAdmissionSummary.
Constructor Details
#initialize(json) ⇒ QueryAdmissionSummary
Returns a new instance of QueryAdmissionSummary.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @admitted_count = hash[:admitted_count] @blockers = (hash[:blockers] || []).map { |item| item ? Rafflesia::QueryAdmissionBlocker.new(item) : nil } @is_executable = hash[:is_executable] @join_count = hash[:join_count] @object = hash[:object] @refused_count = hash[:refused_count] @repair_commands = (hash[:repair_commands] || []).map { |item| (item || []) } end |
Instance Attribute Details
#admitted_count ⇒ Object
Returns the value of attribute admitted_count.
18 19 20 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 18 def admitted_count @admitted_count end |
#blockers ⇒ Object
Returns the value of attribute blockers.
18 19 20 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 18 def blockers @blockers end |
#is_executable ⇒ Object
Returns the value of attribute is_executable.
18 19 20 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 18 def is_executable @is_executable end |
#join_count ⇒ Object
Returns the value of attribute join_count.
18 19 20 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 18 def join_count @join_count end |
#object ⇒ Object
Returns the value of attribute object.
18 19 20 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 18 def object @object end |
#refused_count ⇒ Object
Returns the value of attribute refused_count.
18 19 20 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 18 def refused_count @refused_count end |
#repair_commands ⇒ Object
Returns the value of attribute repair_commands.
18 19 20 |
# File 'lib/rafflesia/query/query_admission_summary.rb', line 18 def repair_commands @repair_commands end |