Sha256: 0c537cd48a98c3e945e64c1cbc981140186dacd853c4695b99a39254340b7e2b

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

module Runbook
  class Node
    attr_accessor :parent

    def initialize
      raise "Should not be initialized"
    end

    def dynamic!
      @dynamic = true
    end

    def visited!
      @visited = true
    end

    def dynamic?
      @dynamic
    end

    def visited?
      @visited
    end

    def parent_entity
      node = self
      while(node && !node.is_a?(Runbook::Entity))
        node = node.parent
      end
      node
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
careacademy-runbook-1.2.0 lib/runbook/node.rb
runbook-1.1.0 lib/runbook/node.rb
runbook-1.0.0 lib/runbook/node.rb