Class: BOAST::Pragma
- Inherits:
-
Object
- Object
- BOAST::Pragma
- Extended by:
- Functor
- Includes:
- Inspectable, PrivateStateAccessor
- Defined in:
- lib/BOAST/Pragma.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name, options) ⇒ Pragma
constructor
A new instance of Pragma.
- #pr ⇒ Object
- #to_s ⇒ Object
Methods included from Functor
Methods included from Inspectable
Methods included from PrivateStateAccessor
private_boolean_state_accessor, private_state_accessor
Constructor Details
#initialize(name, options) ⇒ Pragma
Returns a new instance of Pragma.
11 12 13 14 |
# File 'lib/BOAST/Pragma.rb', line 11 def initialize(name, ) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/BOAST/Pragma.rb', line 8 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/BOAST/Pragma.rb', line 9 def @options end |
Instance Method Details
#pr ⇒ Object
29 30 31 32 33 34 |
# File 'lib/BOAST/Pragma.rb', line 29 def pr s="" s += to_s output.puts s return self end |
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/BOAST/Pragma.rb', line 16 def to_s s = "" if lang == FORTRAN then s += "$!" else s += "#pragma" end @options.each{ |opt| s += " #{opt}" } return s end |