Class: ROM::SQL::Relation::ViewDSL Private
- Inherits:
-
Object
- Object
- ROM::SQL::Relation::ViewDSL
- Defined in:
- lib/rom/repository/ext/relation/view_dsl.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
View DSL evaluator
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly private
- #name ⇒ Object readonly private
- #relation_block ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Object private
- #header(attributes) ⇒ Object private
-
#initialize(name, &block) ⇒ ViewDSL
constructor
private
A new instance of ViewDSL.
- #relation(&block) ⇒ Object private
Constructor Details
#initialize(name, &block) ⇒ ViewDSL
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ViewDSL.
14 15 16 17 |
# File 'lib/rom/repository/ext/relation/view_dsl.rb', line 14 def initialize(name, &block) @name = name instance_eval(&block) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'lib/rom/repository/ext/relation/view_dsl.rb', line 10 def attributes @attributes end |
#name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/rom/repository/ext/relation/view_dsl.rb', line 8 def name @name end |
#relation_block ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/rom/repository/ext/relation/view_dsl.rb', line 12 def relation_block @relation_block end |
Instance Method Details
#call ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/rom/repository/ext/relation/view_dsl.rb', line 27 def call [name, attributes, relation_block] end |
#header(attributes) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/rom/repository/ext/relation/view_dsl.rb', line 19 def header(attributes) @attributes = attributes end |
#relation(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/rom/repository/ext/relation/view_dsl.rb', line 23 def relation(&block) @relation_block = lambda(&block) end |