Class: Kennel::Models::Project
- Defined in:
- lib/kennel/models/project.rb
Constant Summary
Constants inherited from Base
Base::SETTING_OVERRIDABLE_METHODS
Constants included from SettingsAsMethods
SettingsAsMethods::AS_PROCS, SettingsAsMethods::SETTING_OVERRIDABLE_METHODS
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Methods included from SubclassTracking
#recursive_subclasses, #subclasses
Methods included from SettingsAsMethods
included, #initialize, #raise_with_location
Class Method Details
.file_location ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/kennel/models/project.rb', line 11 def self.file_location @file_location ||= begin method_in_file = instance_methods(false).first return if method_in_file.nil? instance_method(method_in_file).source_location.first.sub("#{Bundler.root}/", "") end end |
Instance Method Details
#validated_parts ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/kennel/models/project.rb', line 20 def validated_parts all = parts unless all.is_a?(Array) && all.all? { |part| part.is_a?(Record) } raise "Project #{kennel_id} #parts must return an array of Records" end validate_parts(all) all end |