Module: Vedeu::DSL
- Included in:
- Borders::DSL, Composition, Line, Stream, View, Geometry::DSL, Groups::DSL, Input::DSL, Interfaces::DSL, Menus::DSL
- Defined in:
- lib/vedeu/dsl/all.rb,
lib/vedeu/dsl/dsl.rb,
lib/vedeu/dsl/use.rb,
lib/vedeu/dsl/line.rb,
lib/vedeu/dsl/text.rb,
lib/vedeu/dsl/view.rb,
lib/vedeu/dsl/shared.rb,
lib/vedeu/dsl/stream.rb,
lib/vedeu/dsl/composition.rb,
lib/vedeu/dsl/presentation.rb
Overview
Provides a mechanism to help configure and use Vedeu.
Defined Under Namespace
Modules: Presentation, Shared, Text, Use Classes: Composition, Line, Stream, View
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
protected
The object instance where the DSL is being used.
-
#model ⇒ void
readonly
protected
The new model object which the DSL is constructing.
Instance Method Summary collapse
-
#attributes ⇒ Hash<Symbol => void>
private
Returns the default attributes for the new model.
-
#initialize(model, client = nil) ⇒ void
Returns an instance of the DSL class including DSL.
-
#method_missing(method, *args, &block) ⇒ void
private
Attempts to find the missing method on the client object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ void (private)
This method returns an undefined value.
Attempts to find the missing method on the client object.
55 56 57 58 59 60 61 |
# File 'lib/vedeu/dsl/dsl.rb', line 55 def method_missing(method, *args, &block) Vedeu.log(type: :debug, message: "!!!method_missing '#{method}' " \ "(#{client.inspect})".freeze) client.send(method, *args, &block) if client end |
Instance Attribute Details
#client ⇒ Object (readonly, protected)
Returns The object instance where the DSL is being used.
24 25 26 |
# File 'lib/vedeu/dsl/dsl.rb', line 24 def client @client end |
#model ⇒ void (readonly, protected)
This method returns an undefined value.
Returns The new model object which the DSL is constructing.
29 30 31 |
# File 'lib/vedeu/dsl/dsl.rb', line 29 def model @model end |
Instance Method Details
#attributes ⇒ Hash<Symbol => void> (private)
Specific DSL classes may be overriding this method.
Returns the default attributes for the new model.
39 40 41 42 43 44 |
# File 'lib/vedeu/dsl/dsl.rb', line 39 def attributes { client: client, parent: model, } end |
#initialize(model, client = nil) ⇒ void
Returns an instance of the DSL class including Vedeu::DSL.
14 15 16 17 |
# File 'lib/vedeu/dsl/dsl.rb', line 14 def initialize(model, client = nil) @model = model @client = client end |