Module: Sevgi::Graphics::Attribute::Ident
- Included in:
- Sevgi::Graphics::Attribute
- Defined in:
- lib/sevgi/graphics/attribute.rb
Instance Method Summary collapse
Instance Method Details
#id(given) ⇒ Object
16 17 18 19 |
# File 'lib/sevgi/graphics/attribute.rb', line 16 def id(given) (@id ||= {})[given] ||= (updateable?(given) ? given.to_s.delete_suffix(ATTRIBUTE_UPDATE_SUFFIX) : given) .to_sym end |
#internal?(given) ⇒ Boolean
12 13 14 |
# File 'lib/sevgi/graphics/attribute.rb', line 12 def internal?(given) (@internal ||= {})[given] ||= given.start_with?(ATTRIBUTE_INTERNAL_PREFIX) end |
#updateable?(given) ⇒ Boolean
21 22 23 |
# File 'lib/sevgi/graphics/attribute.rb', line 21 def updateable?(given) (@updateable ||= {})[given] ||= given.end_with?(ATTRIBUTE_UPDATE_SUFFIX) end |