Class: DNApi::Components::VersionedComponent

Inherits:
Struct
  • Object
show all
Defined in:
lib/dnapi/components/versioned_component.rb

Instance Attribute Summary

Attributes inherited from Struct

#parent

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#==, _many, #_many, #_many_values, _ones, #_ones, #_ones_values, _umembers, belongs_to, from, #initialize, #inspect, many, map, one, #to_hash, #umember_inspect, unserialized_member

Methods included from Test::Ext

#default_fauxture_name, #fixture, #generate, #generate_attributes, #pick

Constructor Details

This class inherits a constructor from DNApi::Struct

Class Method Details

.labelObject



5
6
7
# File 'lib/dnapi/components/versioned_component.rb', line 5

def self.label
  "#{self::NAME} #{self::VERSION}"
end

Instance Method Details

#app_server_stacksObject



9
10
11
12
13
# File 'lib/dnapi/components/versioned_component.rb', line 9

def app_server_stacks
  DNApi::Stack.all.select do |stack|
    stack.ruby_versions.include?(self.class)
  end
end

#labelObject



19
20
21
# File 'lib/dnapi/components/versioned_component.rb', line 19

def label
  self.class.label
end

#nameObject



15
16
17
# File 'lib/dnapi/components/versioned_component.rb', line 15

def name
  self.class::NAME
end

#patch_levelObject



27
28
29
# File 'lib/dnapi/components/versioned_component.rb', line 27

def patch_level
  self.class::PATCH_LEVEL
end

#versionObject



23
24
25
# File 'lib/dnapi/components/versioned_component.rb', line 23

def version
  self.class::VERSION
end