Class: Stupidedi::Versions::FunctionalGroups::FiftyTen::SyntaxNotes::E
Overview
Exclusion: not more than one of the elements in the condition may be present
Instance Attribute Summary
#indexes
Class Method Summary
collapse
Instance Method Summary
collapse
#errors, #initialize, #satisfied?
Class Method Details
.build(*args) ⇒ Object
102
103
104
|
# File 'lib/stupidedi/versions/functional_groups/005010/syntax_notes.rb', line 102
def build(*args)
new(args)
end
|
Instance Method Details
#forbidden(zipper) ⇒ Object
86
87
88
89
90
91
92
93
|
# File 'lib/stupidedi/versions/functional_groups/005010/syntax_notes.rb', line 86
def forbidden(zipper)
if zipper.node.present?
xs = children(zipper)
xs.count{|x| x.node.present? } <= 1 ? [] : xs
else
[]
end
end
|
#reason(zipper) ⇒ Object
95
96
97
98
|
# File 'lib/stupidedi/versions/functional_groups/005010/syntax_notes.rb', line 95
def reason(zipper)
present = indexes.select{|n| zipper.child(n - 1).node.present? }
"only one of elements #{present.join(", ")} may be present"
end
|
#required(zipper) ⇒ Object
82
83
84
|
# File 'lib/stupidedi/versions/functional_groups/005010/syntax_notes.rb', line 82
def required(zipper)
[]
end
|