Class: Commands::Init::DepotModel
- Includes:
- P4Helpers
- Defined in:
- lib/commands/init/depot_model.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#depot ⇒ Object
Returns the value of attribute depot.
-
#description ⇒ Object
Returns the value of attribute description.
-
#map ⇒ Object
Returns the value of attribute map.
-
#spec_map ⇒ Object
Returns the value of attribute spec_map.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
-
.abstract ⇒ Object
Internal implementation ========================================================================.
Instance Method Summary collapse
- #execute(p4, models = nil, super_user = nil) ⇒ Object
-
#initialize ⇒ DepotModel
constructor
A new instance of DepotModel.
Methods included from P4Helpers
Methods inherited from InitModel
inheritable_attributes, inherited, #rank, run
Constructor Details
#initialize ⇒ DepotModel
Returns a new instance of DepotModel.
37 38 39 40 41 42 43 44 45 |
# File 'lib/commands/init/depot_model.rb', line 37 def initialize @depot = self.class.depot @description = self.class.description @type = self.class.type @address = self.class.address @suffix = self.class.suffix @map = self.class.map @spec_map = self.class.spec_map end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
35 36 37 |
# File 'lib/commands/init/depot_model.rb', line 35 def address @address end |
#depot ⇒ Object
Returns the value of attribute depot.
35 36 37 |
# File 'lib/commands/init/depot_model.rb', line 35 def depot @depot end |
#description ⇒ Object
Returns the value of attribute description.
35 36 37 |
# File 'lib/commands/init/depot_model.rb', line 35 def description @description end |
#map ⇒ Object
Returns the value of attribute map.
35 36 37 |
# File 'lib/commands/init/depot_model.rb', line 35 def map @map end |
#spec_map ⇒ Object
Returns the value of attribute spec_map.
35 36 37 |
# File 'lib/commands/init/depot_model.rb', line 35 def spec_map @spec_map end |
#suffix ⇒ Object
Returns the value of attribute suffix.
35 36 37 |
# File 'lib/commands/init/depot_model.rb', line 35 def suffix @suffix end |
#type ⇒ Object
Returns the value of attribute type.
35 36 37 |
# File 'lib/commands/init/depot_model.rb', line 35 def type @type end |
Class Method Details
.abstract ⇒ Object
Internal implementation
31 32 33 |
# File 'lib/commands/init/depot_model.rb', line 31 def self.abstract true end |
Instance Method Details
#execute(p4, models = nil, super_user = nil) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/commands/init/depot_model.rb', line 47 def execute(p4, models=nil, super_user=nil) d = p4.fetch_depot(depot) d._depot = depot d._description = description if description d._type = type if type d._address = address if address d._suffix = suffix if suffix d._map = map if map d._spec_map = spec_map if spec_map p4.save_depot(d) end |