Class: Hecks::Bluebook::MetaValidator::Plan::Category
- Inherits:
-
Struct
- Object
- Struct
- Hecks::Bluebook::MetaValidator::Plan::Category
- Defined in:
- lib/hecks/bluebook/meta_validator/plan.rb
Instance Attribute Summary collapse
-
#alternates ⇒ Object
Returns the value of attribute alternates.
-
#appends ⇒ Object
Returns the value of attribute appends.
-
#declare ⇒ Object
Returns the value of attribute declare.
-
#entity_owned ⇒ Object
Returns the value of attribute entity_owned.
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#identity_paths ⇒ Object
Returns the value of attribute identity_paths.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#parent_key ⇒ Object
Returns the value of attribute parent_key.
-
#references ⇒ Object
Returns the value of attribute references.
-
#sealers ⇒ Object
Returns the value of attribute sealers.
-
#setters ⇒ Object
Returns the value of attribute setters.
Instance Method Summary collapse
-
#references?(verb, argument) ⇒ Boolean
DOES THIS ARGUMENT CARRY AN ID? A reference is the id of a head, and an id is a scalar — so the judge offers it bare, where every other field goes as a one-field value object.
- #root? ⇒ Boolean
-
#verbs ⇒ Object
Every verb this category declares, in declaration order.
Instance Attribute Details
#alternates ⇒ Object
Returns the value of attribute alternates
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def alternates @alternates end |
#appends ⇒ Object
Returns the value of attribute appends
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def appends @appends end |
#declare ⇒ Object
Returns the value of attribute declare
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def declare @declare end |
#entity_owned ⇒ Object
Returns the value of attribute entity_owned
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def entity_owned @entity_owned end |
#fields ⇒ Object
Returns the value of attribute fields
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def fields @fields end |
#identity_paths ⇒ Object
Returns the value of attribute identity_paths
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def identity_paths @identity_paths end |
#name ⇒ Object
Returns the value of attribute name
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def parent @parent end |
#parent_key ⇒ Object
Returns the value of attribute parent_key
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def parent_key @parent_key end |
#references ⇒ Object
Returns the value of attribute references
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def references @references end |
#sealers ⇒ Object
Returns the value of attribute sealers
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def sealers @sealers end |
#setters ⇒ Object
Returns the value of attribute setters
44 45 46 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 44 def setters @setters end |
Instance Method Details
#references?(verb, argument) ⇒ Boolean
DOES THIS ARGUMENT CARRY AN ID? A reference is the id of a head, and an id is a scalar — so the judge offers it bare, where every other field goes as a one-field value object. The language answers this about itself, so declaring a new reference needs no change here.
60 61 62 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 60 def references?(verb, argument) Array(references[verb.to_s]).include?(argument.to_s) end |
#root? ⇒ Boolean
64 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 64 def root? = parent.nil? |
#verbs ⇒ Object
Every verb this category declares, in declaration order. alternates
matters here: two commands can append to one list, and a verb missing
from this is a verb the coverage gate stops watching.
51 52 53 54 |
# File 'lib/hecks/bluebook/meta_validator/plan.rb', line 51 def verbs [declare, *setters.map(&:verb), *appends.values.map(&:verb), *alternates.map(&:verb), *sealers].compact end |