Class: Katello::RepositoryType::GenericContentType
- Inherits:
-
ContentType
- Object
- ContentType
- Katello::RepositoryType::GenericContentType
- Defined in:
- app/services/katello/repository_type.rb
Instance Attribute Summary collapse
-
#duplicates_allowed ⇒ Object
Returns the value of attribute duplicates_allowed.
-
#filename_key ⇒ Object
Returns the value of attribute filename_key.
-
#model_additional_metadata ⇒ Object
Returns the value of attribute model_additional_metadata.
-
#model_filename ⇒ Object
Returns the value of attribute model_filename.
-
#model_name ⇒ Object
Returns the value of attribute model_name.
-
#model_version ⇒ Object
Returns the value of attribute model_version.
-
#pluralized_name ⇒ Object
Returns the value of attribute pluralized_name.
-
#pulp3_api ⇒ Object
Returns the value of attribute pulp3_api.
-
#pulp3_model ⇒ Object
Returns the value of attribute pulp3_model.
Attributes inherited from ContentType
#content_type, #generic_browser, #index, #model_class, #mutable, #primary_content, #priority, #pulp3_service_class, #removable, #repository_import_on_upload, #test_upload_path, #uploadable
Instance Method Summary collapse
- #as_json(_options = {}) ⇒ Object
- #details_columns ⇒ Object
- #generic? ⇒ Boolean
-
#initialize(options) ⇒ GenericContentType
constructor
A new instance of GenericContentType.
- #label ⇒ Object
Constructor Details
#initialize(options) ⇒ GenericContentType
Returns a new instance of GenericContentType.
186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'app/services/katello/repository_type.rb', line 186 def initialize() super self.pulp3_api = [:pulp3_api] self.pulp3_model = [:pulp3_model] self.content_type = [:content_type] self.filename_key = [:filename_key] self.duplicates_allowed = [:duplicates_allowed] self.pluralized_name = [:pluralized_name] self.model_name = [:model_name] self.model_version = [:model_version] self.model_filename = [:model_filename] self. = [:model_additional_metadata] end |
Instance Attribute Details
#duplicates_allowed ⇒ Object
Returns the value of attribute duplicates_allowed.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def duplicates_allowed @duplicates_allowed end |
#filename_key ⇒ Object
Returns the value of attribute filename_key.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def filename_key @filename_key end |
#model_additional_metadata ⇒ Object
Returns the value of attribute model_additional_metadata.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def @model_additional_metadata end |
#model_filename ⇒ Object
Returns the value of attribute model_filename.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def model_filename @model_filename end |
#model_name ⇒ Object
Returns the value of attribute model_name.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def model_name @model_name end |
#model_version ⇒ Object
Returns the value of attribute model_version.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def model_version @model_version end |
#pluralized_name ⇒ Object
Returns the value of attribute pluralized_name.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def pluralized_name @pluralized_name end |
#pulp3_api ⇒ Object
Returns the value of attribute pulp3_api.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def pulp3_api @pulp3_api end |
#pulp3_model ⇒ Object
Returns the value of attribute pulp3_model.
183 184 185 |
# File 'app/services/katello/repository_type.rb', line 183 def pulp3_model @pulp3_model end |
Instance Method Details
#as_json(_options = {}) ⇒ Object
216 217 218 219 220 221 222 223 224 225 |
# File 'app/services/katello/repository_type.rb', line 216 def as_json( = {}) super.merge( { :generic => true, :pluralized_label => content_type.pluralize, :pluralized_name => pluralized_name, :details_columns => details_columns } ) end |
#details_columns ⇒ Object
208 209 210 211 212 213 214 |
# File 'app/services/katello/repository_type.rb', line 208 def details_columns columns = [] columns << "Name" if self.model_name columns << "Version" if self.model_version columns << "Filename" if self.model_filename columns end |
#generic? ⇒ Boolean
204 205 206 |
# File 'app/services/katello/repository_type.rb', line 204 def generic? true end |
#label ⇒ Object
200 201 202 |
# File 'app/services/katello/repository_type.rb', line 200 def label self.content_type end |