Class: HammerCLI::Options::Normalizers::AbstractNormalizer
- Inherits:
-
Object
- Object
- HammerCLI::Options::Normalizers::AbstractNormalizer
show all
- Defined in:
- lib/hammer_cli/options/normalizers.rb
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Class Attribute Details
.available ⇒ Object
Returns the value of attribute available.
13
14
15
|
# File 'lib/hammer_cli/options/normalizers.rb', line 13
def available
@available
end
|
Class Method Details
.common_description ⇒ Object
24
25
26
|
# File 'lib/hammer_cli/options/normalizers.rb', line 24
def common_description
_("Value described in the option's description. Mostly simple string")
end
|
.completion_type ⇒ Object
20
21
22
|
# File 'lib/hammer_cli/options/normalizers.rb', line 20
def completion_type
:value
end
|
.inherited(subclass) ⇒ Object
15
16
17
18
|
# File 'lib/hammer_cli/options/normalizers.rb', line 15
def inherited(subclass)
@available ||= []
@available << subclass
end
|
Instance Method Details
#complete(val) ⇒ Object
37
38
39
|
# File 'lib/hammer_cli/options/normalizers.rb', line 37
def complete(val)
[]
end
|
#completion_type ⇒ Object
41
42
43
|
# File 'lib/hammer_cli/options/normalizers.rb', line 41
def completion_type
{ type: self.class.completion_type }
end
|
#description ⇒ Object
29
30
31
|
# File 'lib/hammer_cli/options/normalizers.rb', line 29
def description
""
end
|
33
34
35
|
# File 'lib/hammer_cli/options/normalizers.rb', line 33
def format(val)
raise NotImplementedError, "Class #{self.class.name} must implement method format."
end
|