Class: SFRP::Raw::Infix
- Inherits:
-
Struct
- Object
- Struct
- SFRP::Raw::Infix
- Defined in:
- lib/sfrp/raw/elements.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#func_ref ⇒ Object
Returns the value of attribute func_ref.
-
#ns ⇒ Object
Returns the value of attribute ns.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#sp ⇒ Object
Returns the value of attribute sp.
Instance Method Summary collapse
Instance Attribute Details
#direction ⇒ Object
Returns the value of attribute direction
122 123 124 |
# File 'lib/sfrp/raw/elements.rb', line 122 def direction @direction end |
#func_ref ⇒ Object
Returns the value of attribute func_ref
122 123 124 |
# File 'lib/sfrp/raw/elements.rb', line 122 def func_ref @func_ref end |
#ns ⇒ Object
Returns the value of attribute ns
122 123 124 |
# File 'lib/sfrp/raw/elements.rb', line 122 def ns @ns end |
#priority ⇒ Object
Returns the value of attribute priority
122 123 124 |
# File 'lib/sfrp/raw/elements.rb', line 122 def priority @priority end |
#sp ⇒ Object
Returns the value of attribute sp
122 123 124 |
# File 'lib/sfrp/raw/elements.rb', line 122 def sp @sp end |
Instance Method Details
#absolute_func_name(set) ⇒ Object
125 126 127 128 129 |
# File 'lib/sfrp/raw/elements.rb', line 125 def absolute_func_name(set) func_name = set.func(ns, func_ref, sp).absolute_name raise NameError.new(func_ref.to_s, sp) unless func_name func_name end |
#absolute_priority(position) ⇒ Object
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/sfrp/raw/elements.rb', line 131 def absolute_priority(position) case direction when LEFT [priority, 1000 - position] when RIGHT [priority, position] when NONE [priority, 0] end end |