Class: SLComponents::NodeShape
- Inherits:
-
Object
- Object
- SLComponents::NodeShape
- Defined in:
- lib/mk_semi_lattice/sl_components.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dx ⇒ Object
Returns the value of attribute dx.
-
#dy ⇒ Object
Returns the value of attribute dy.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#fixed ⇒ Object
Returns the value of attribute fixed.
-
#label ⇒ Object
Returns the value of attribute label.
-
#linked ⇒ Object
Returns the value of attribute linked.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
- #color=(c) ⇒ Object
-
#initialize(attrs = {}) ⇒ NodeShape
constructor
A new instance of NodeShape.
- #setup_shape ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ NodeShape
Returns a new instance of NodeShape.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 14 def initialize(attrs = {}) @x = attrs[:x] @y = attrs[:y] @z = attrs[:z] @color = attrs[:color] @name = attrs[:name] @label = attrs[:label] @fixed = attrs[:fixed] @linked = attrs[:linked] @dx = attrs[:dx] @dy = attrs[:dy] @type = attrs[:type] @file_path = attrs[:file_path] @icon_path = attrs[:icon_path] || nil setup_shape end |
Instance Attribute Details
#dx ⇒ Object
Returns the value of attribute dx.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def dx @dx end |
#dy ⇒ Object
Returns the value of attribute dy.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def dy @dy end |
#file_path ⇒ Object
Returns the value of attribute file_path.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def file_path @file_path end |
#fixed ⇒ Object
Returns the value of attribute fixed.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def fixed @fixed end |
#label ⇒ Object
Returns the value of attribute label.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def label @label end |
#linked ⇒ Object
Returns the value of attribute linked.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def linked @linked end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def type @type end |
#x ⇒ Object
Returns the value of attribute x.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
12 13 14 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 12 def y @y end |
Instance Method Details
#color=(c) ⇒ Object
31 32 33 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 31 def color=(c) # 派生クラスでオーバーライド end |
#setup_shape ⇒ Object
43 44 45 |
# File 'lib/mk_semi_lattice/sl_components.rb', line 43 def setup_shape # 派生クラスでオーバーライド end |