Class: Viewmatic::View
- Inherits:
-
Object
- Object
- Viewmatic::View
- Defined in:
- lib/viewmatic/view.rb
Overview
Represents a view to be built.
Instance Method Summary collapse
-
#column_names(val = nil) ⇒ Object
Get/set the query column name overrides.
-
#initialize(name, materialized: false) ⇒ View
constructor
Initialize a new view.
-
#materialized(val = nil) ⇒ Object
Get/set the materialized status.
-
#name(val = nil) ⇒ Object
Get/set the view name.
-
#query(val = nil) ⇒ Object
Get/set the query backing the view.
Constructor Details
#initialize(name, materialized: false) ⇒ View
Initialize a new view.
12 13 14 15 |
# File 'lib/viewmatic/view.rb', line 12 def initialize(name, materialized: false) @name = name @materialized = materialized end |
Instance Method Details
#column_names(val = nil) ⇒ Object
Get/set the query column name overrides
30 31 32 33 |
# File 'lib/viewmatic/view.rb', line 30 def column_names(val = nil) @column_names = val unless val.nil? @column_names end |
#materialized(val = nil) ⇒ Object
Get/set the materialized status
36 37 38 39 |
# File 'lib/viewmatic/view.rb', line 36 def materialized(val = nil) @materialized = val unless val.nil? @materialized end |
#name(val = nil) ⇒ Object
Get/set the view name
18 19 20 21 |
# File 'lib/viewmatic/view.rb', line 18 def name(val = nil) @name = val unless val.nil? @name end |
#query(val = nil) ⇒ Object
Get/set the query backing the view
24 25 26 27 |
# File 'lib/viewmatic/view.rb', line 24 def query(val = nil) @query = val unless val.nil? @query end |