Module: Vedeu::DSL::Use
- Included in:
- Borders::DSL, Views, Geometries::DSL, Interfaces::DSL, Views::View::DSL
- Defined in:
- lib/vedeu/dsl/use.rb
Overview
Provides helper methods for building views.
Instance Method Summary collapse
-
#use(name) ⇒ void
Use the attribute of stored model.
Instance Method Details
#use(name) ⇒ void
Note:
-
Only models of the same repository can be used in this way.
-
If the stored model cannot be found, a ModelNotFound exception may be raised, or the request for an attribute may raise a NoMethodError exception.
This method returns an undefined value.
Use the attribute of stored model.
This DSL method provides access to a stored model by name. You can then request an attribute of that model for use within the current model. The models which current support this are Border, Geometry and Interface.
37 38 39 |
# File 'lib/vedeu/dsl/use.rb', line 37 def use(name) model.repository.by_name(name) end |