Class: ROM::SQL::Relation::ViewDSL Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#attributesObject (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

#nameObject (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_blockObject (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

#callObject

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