Class: Rukawa::GraphNodeConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/rukawa/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#shapeObject

Returns the value of attribute shape

Returns:

  • (Object)

    the current value of shape



48
49
50
# File 'lib/rukawa/configuration.rb', line 48

def shape
  @shape
end

#styleObject

Returns the value of attribute style

Returns:

  • (Object)

    the current value of style



48
49
50
# File 'lib/rukawa/configuration.rb', line 48

def style
  @style
end

Instance Method Details

#attrsObject



49
50
51
52
53
54
55
56
# File 'lib/rukawa/configuration.rb', line 49

def attrs
  if shape || style
    values = to_h.map { |k, v| "#{k} = #{v}" if v }.compact
    "node [#{values.join(",")}];\n"
  else
    ""
  end
end