Method: Train::Platforms.name
- Defined in:
- lib/train/platforms.rb
.name(name, condition = {}) ⇒ Object
Create or update a platform
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/train/platforms.rb', line 38 def self.name(name, condition = {}) # Check the list to see if one is already created plat = list[name] unless plat.nil? # Pass the condition incase we are adding a family relationship plat.condition = condition unless condition.nil? return plat end Train::Platforms::Platform.new(name, condition) end |