Class: RuboCop::Schema::Spec
- Inherits:
-
Struct
- Object
- Struct
- RuboCop::Schema::Spec
- Defined in:
- lib/rubocop/schema/value_objects.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
12 13 14 |
# File 'lib/rubocop/schema/value_objects.rb', line 12 def name @name end |
#version ⇒ Object
Returns the value of attribute version
12 13 14 |
# File 'lib/rubocop/schema/value_objects.rb', line 12 def version @version end |
Instance Method Details
#short_name ⇒ Object
13 14 15 16 17 |
# File 'lib/rubocop/schema/value_objects.rb', line 13 def short_name return nil if name == 'rubocop' name[8..-1] end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/rubocop/schema/value_objects.rb', line 19 def to_s "#{short_name || name}-#{version}" end |