Class: Gitlab::UsageMetricDefinitionGenerator::Directory
- Inherits:
-
Struct
- Object
- Struct
- Gitlab::UsageMetricDefinitionGenerator::Directory
- Defined in:
- lib/generators/gitlab/usage_metric_definition_generator.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#time_frame ⇒ Object
Returns the value of attribute time_frame.
-
#value_type ⇒ Object
Returns the value of attribute value_type.
Instance Method Summary collapse
-
#initialize ⇒ Directory
constructor
A new instance of Directory.
- #match?(str) ⇒ Boolean
Constructor Details
#initialize ⇒ Directory
Returns a new instance of Directory.
8 9 10 11 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 8 def initialize(...) super freeze end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
7 8 9 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 7 def name @name end |
#time_frame ⇒ Object
Returns the value of attribute time_frame
7 8 9 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 7 def time_frame @time_frame end |
#value_type ⇒ Object
Returns the value of attribute value_type
7 8 9 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 7 def value_type @value_type end |
Instance Method Details
#match?(str) ⇒ Boolean
13 14 15 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 13 def match?(str) (name == str || time_frame == str) && str != 'none' end |