Class: Prick::Build::BuildNode
Overview
A build.yml file node
Direct Known Subclasses
Instance Attribute Summary collapse
-
#auth_nodes ⇒ Object
readonly
Returns the value of attribute auth_nodes.
-
#decl_nodes ⇒ Object
readonly
Returns the value of attribute decl_nodes.
-
#has_schema ⇒ Object
True if the build file contains a ‘schema’ attribute.
-
#init_nodes ⇒ Object
readonly
Nodes are executed in this order:.
-
#pg_graph_ignore_schema ⇒ Object
Returns the value of attribute pg_graph_ignore_schema.
-
#refresh_schema ⇒ Object
Returns the value of attribute refresh_schema.
-
#seed_nodes ⇒ Object
readonly
Returns the value of attribute seed_nodes.
-
#term_nodes ⇒ Object
readonly
Returns the value of attribute term_nodes.
Attributes inherited from Node
#args, #kind, #parent, #path, #phase
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(parent, path) ⇒ BuildNode
constructor
A new instance of BuildNode.
- #inspect ⇒ Object
- #nodes ⇒ Object
Methods inherited from Node
#dir, #lines, #name, #prefix_lines, #relpath, #schema, #schema=, #source, #source_lines, #to_s
Constructor Details
#initialize(parent, path) ⇒ BuildNode
Returns a new instance of BuildNode.
270 271 272 273 274 275 276 277 278 279 |
# File 'lib/prick/builder/node.rb', line 270 def initialize(parent, path) super(parent, nil, :yml, path) @init_nodes = [] @decl_nodes = [] @seed_nodes = [] @auth_nodes = [] @term_nodes = [] @pg_graph_ignore_schema = false @refresh_schema = true end |
Instance Attribute Details
#auth_nodes ⇒ Object (readonly)
Returns the value of attribute auth_nodes.
264 265 266 |
# File 'lib/prick/builder/node.rb', line 264 def auth_nodes @auth_nodes end |
#decl_nodes ⇒ Object (readonly)
Returns the value of attribute decl_nodes.
262 263 264 |
# File 'lib/prick/builder/node.rb', line 262 def decl_nodes @decl_nodes end |
#has_schema ⇒ Object
True if the build file contains a ‘schema’ attribute
256 257 258 |
# File 'lib/prick/builder/node.rb', line 256 def has_schema @has_schema end |
#init_nodes ⇒ Object (readonly)
Nodes are executed in this order:
261 262 263 |
# File 'lib/prick/builder/node.rb', line 261 def init_nodes @init_nodes end |
#pg_graph_ignore_schema ⇒ Object
Returns the value of attribute pg_graph_ignore_schema.
267 268 269 |
# File 'lib/prick/builder/node.rb', line 267 def pg_graph_ignore_schema @pg_graph_ignore_schema end |
#refresh_schema ⇒ Object
Returns the value of attribute refresh_schema.
268 269 270 |
# File 'lib/prick/builder/node.rb', line 268 def refresh_schema @refresh_schema end |
#seed_nodes ⇒ Object (readonly)
Returns the value of attribute seed_nodes.
263 264 265 |
# File 'lib/prick/builder/node.rb', line 263 def seed_nodes @seed_nodes end |
#term_nodes ⇒ Object (readonly)
Returns the value of attribute term_nodes.
265 266 267 |
# File 'lib/prick/builder/node.rb', line 265 def term_nodes @term_nodes end |
Instance Method Details
#dump ⇒ Object
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/prick/builder/node.rb', line 283 def dump puts "BuildNode #{path}" indent { puts "has_schema: #{has_schema}" puts "schema: #{@schema || 'nil'}" puts "refresh: #{refresh_schema.to_s}" puts "pg_graph_ignore_schema: #{pg_graph_ignore_schema}" decl_nodes.each(&:dump) for kind in [:init, :seed, :auth, :term] kind_nodes = self.send("#{kind}_nodes".to_sym) if !kind_nodes.empty? puts "#{kind}:" indent { kind_nodes.each(&:dump) } end end } end |
#inspect ⇒ Object
281 |
# File 'lib/prick/builder/node.rb', line 281 def inspect() to_s end |
#nodes ⇒ Object
258 |
# File 'lib/prick/builder/node.rb', line 258 def nodes() @nodes ||= init_nodes + decl_nodes + seed_nodes + auth_nodes + term_nodes end |