Class: XMigra::View
- Inherits:
-
AccessArtifact
- Object
- AccessArtifact
- XMigra::View
- Defined in:
- lib/xmigra/view.rb
Constant Summary collapse
- OBJECT_TYPE =
"VIEW"
Instance Attribute Summary collapse
-
#depends_on ⇒ Object
readonly
Returns the value of attribute depends_on.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from AccessArtifact
#file_path, #filename_metavariable
Instance Method Summary collapse
-
#initialize(view_info) ⇒ View
constructor
Construct with a hash (as if loaded from a view YAML file).
Methods inherited from AccessArtifact
#check_existence_sql, #creation_notice, #creation_sql, #ddl_block_separator, #definition_sql, #insert_access_creation_record_sql, #printable_type
Constructor Details
#initialize(view_info) ⇒ View
Construct with a hash (as if loaded from a view YAML file)
9 10 11 12 13 |
# File 'lib/xmigra/view.rb', line 9 def initialize(view_info) @name = view_info["name"].dup.freeze @depends_on = view_info.fetch("referencing", []).dup.freeze @definition = view_info["sql"].dup.freeze end |
Instance Attribute Details
#depends_on ⇒ Object (readonly)
Returns the value of attribute depends_on.
15 16 17 |
# File 'lib/xmigra/view.rb', line 15 def depends_on @depends_on end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/xmigra/view.rb', line 15 def name @name end |