Module: Rails::Paths::PathParent
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *args) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rails/paths.rb', line 8 def method_missing(id, *args) name = id.to_s if name =~ /^(.*)=$/ || args.any? @children[$1 || name] = Path.new(@root, *args) elsif path = @children[name] path else super end end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
6 7 8 |
# File 'lib/rails/paths.rb', line 6 def children @children end |