Class: K8y::GroupVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/k8y/group_version.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(group:, version:) ⇒ GroupVersion

Returns a new instance of GroupVersion.



7
8
9
10
# File 'lib/k8y/group_version.rb', line 7

def initialize(group:, version:)
  @group = group
  @version = version
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



5
6
7
# File 'lib/k8y/group_version.rb', line 5

def group
  @group
end

#versionObject (readonly)

Returns the value of attribute version.



5
6
7
# File 'lib/k8y/group_version.rb', line 5

def version
  @version
end

Instance Method Details

#to_method_nameObject



16
17
18
# File 'lib/k8y/group_version.rb', line 16

def to_method_name
  "#{group}_#{version}"
end

#to_sObject



12
13
14
# File 'lib/k8y/group_version.rb', line 12

def to_s
  "#{group}/#{version}"
end