Class: Katello::RepositoryType::ContentType
- Inherits:
-
Object
- Object
- Katello::RepositoryType::ContentType
- Defined in:
- app/services/katello/repository_type.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#generic_browser ⇒ Object
Returns the value of attribute generic_browser.
-
#index ⇒ Object
Returns the value of attribute index.
-
#model_class ⇒ Object
Returns the value of attribute model_class.
-
#mutable ⇒ Object
Returns the value of attribute mutable.
-
#primary_content ⇒ Object
Returns the value of attribute primary_content.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#pulp3_service_class ⇒ Object
Returns the value of attribute pulp3_service_class.
-
#removable ⇒ Object
Returns the value of attribute removable.
-
#repository_import_on_upload ⇒ Object
Returns the value of attribute repository_import_on_upload.
-
#test_upload_path ⇒ Object
Returns the value of attribute test_upload_path.
-
#uploadable ⇒ Object
Returns the value of attribute uploadable.
Instance Method Summary collapse
- #as_json(_options = {}) ⇒ Object
- #generic? ⇒ Boolean
-
#initialize(options) ⇒ ContentType
constructor
A new instance of ContentType.
- #label ⇒ Object
Constructor Details
#initialize(options) ⇒ ContentType
Returns a new instance of ContentType.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'app/services/katello/repository_type.rb', line 147 def initialize() self.model_class = [:model_class] self.content_type = [:content_type] self.priority = [:priority] || 99 self.pulp3_service_class = [:pulp3_service_class] self.index = [:index].nil? ? true : [:index] self.uploadable = [:uploadable] || false self.removable = [:removable] || false self.primary_content = [:primary_content] || false self.generic_browser = [:generic_browser] self.repository_import_on_upload = [:repository_import_on_upload] self.test_upload_path = [:test_upload_path] self.mutable = .fetch(:mutable, false) end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def content_type @content_type end |
#generic_browser ⇒ Object
Returns the value of attribute generic_browser.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def generic_browser @generic_browser end |
#index ⇒ Object
Returns the value of attribute index.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def index @index end |
#model_class ⇒ Object
Returns the value of attribute model_class.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def model_class @model_class end |
#mutable ⇒ Object
Returns the value of attribute mutable.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def mutable @mutable end |
#primary_content ⇒ Object
Returns the value of attribute primary_content.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def primary_content @primary_content end |
#priority ⇒ Object
Returns the value of attribute priority.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def priority @priority end |
#pulp3_service_class ⇒ Object
Returns the value of attribute pulp3_service_class.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def pulp3_service_class @pulp3_service_class end |
#removable ⇒ Object
Returns the value of attribute removable.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def removable @removable end |
#repository_import_on_upload ⇒ Object
Returns the value of attribute repository_import_on_upload.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def repository_import_on_upload @repository_import_on_upload end |
#test_upload_path ⇒ Object
Returns the value of attribute test_upload_path.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def test_upload_path @test_upload_path end |
#uploadable ⇒ Object
Returns the value of attribute uploadable.
143 144 145 |
# File 'app/services/katello/repository_type.rb', line 143 def uploadable @uploadable end |
Instance Method Details
#as_json(_options = {}) ⇒ Object
166 167 168 169 170 171 172 173 174 175 |
# File 'app/services/katello/repository_type.rb', line 166 def as_json( = {}) { label: label, generic_browser: generic_browser, generic: false, removable: removable, uploadable: uploadable, indexed: index } end |
#generic? ⇒ Boolean
177 178 179 |
# File 'app/services/katello/repository_type.rb', line 177 def generic? false end |
#label ⇒ Object
162 163 164 |
# File 'app/services/katello/repository_type.rb', line 162 def label self.model_class::CONTENT_TYPE end |