Module: Duxml::AttrNamePattern
- Included in:
- AttrNamePatternClass
- Defined in:
- lib/duxml/meta/grammar/pattern/attr_name_pattern.rb,
lib/duxml/meta/grammar/pattern/attr_name_pattern.rb
Instance Method Summary collapse
-
#abstract? ⇒ Boolean
True if subject does not have the attr_name; false otherwise.
- #description ⇒ Object
- #relationship ⇒ Object
Instance Method Details
#abstract? ⇒ Boolean
Returns true if subject does not have the attr_name; false otherwise.
27 28 29 |
# File 'lib/duxml/meta/grammar/pattern/attr_name_pattern.rb', line 27 def abstract? subject[attr_name].nil? end |
#description ⇒ Object
31 32 33 34 |
# File 'lib/duxml/meta/grammar/pattern/attr_name_pattern.rb', line 31 def description abstract? ? "#{subject.description} does not have #{relationship} [#{attr_name}]" : "#{subject.description}'s #{relationship} [#{attr_name}]" end |
#relationship ⇒ Object
22 23 24 |
# File 'lib/duxml/meta/grammar/pattern/attr_name_pattern.rb', line 22 def relationship 'attribute' end |