class Dendrite::Generators::Base
Attributes
graph[R]
services[R]
Public Class Methods
new(graph:, service_names:)
click to toggle source
# File lib/dendrite/generators/base.rb, line 6 def initialize(graph:, service_names:) @graph = graph @services = graph.services .select { |service_name, service| service_names.include?(service_name) } .collect { |_, service| service } end
Public Instance Methods
to_h()
click to toggle source
# File lib/dendrite/generators/base.rb, line 13 def to_h raise NotImplementedError end
to_json()
click to toggle source
# File lib/dendrite/generators/base.rb, line 21 def to_json self.to_h.to_json end
to_yaml()
click to toggle source
# File lib/dendrite/generators/base.rb, line 17 def to_yaml self.to_h.deep_stringify_keys.to_yaml end