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.
11 12 13 14 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 11 def initialize(...) super freeze end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 10 def name @name end |
#time_frame ⇒ Object
Returns the value of attribute time_frame
10 11 12 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 10 def time_frame @time_frame end |
#value_type ⇒ Object
Returns the value of attribute value_type
10 11 12 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 10 def value_type @value_type end |
Instance Method Details
#match?(str) ⇒ Boolean
16 17 18 |
# File 'lib/generators/gitlab/usage_metric_definition_generator.rb', line 16 def match?(str) (name == str || time_frame == str) && str != 'none' end |