Class: Specific::Tag
- Inherits:
-
Struct
- Object
- Struct
- Specific::Tag
- Defined in:
- lib/specific/tag.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/specific/tag.rb', line 2 def name @name end |
Instance Method Details
#group? ⇒ Boolean
7 8 9 |
# File 'lib/specific/tag.rb', line 7 def group? !!group_name end |
#group_name ⇒ Object
15 16 17 |
# File 'lib/specific/tag.rb', line 15 def group_name @group_name ||= (name.match(/^group_(.+)$/) || [])[1] end |
#id ⇒ Object
11 12 13 |
# File 'lib/specific/tag.rb', line 11 def id @id ||= (name.match(/^id_(.+)$/) || [])[1] end |
#id? ⇒ Boolean
3 4 5 |
# File 'lib/specific/tag.rb', line 3 def id? !!id end |