Class: FFI::Compiler::Flags
- Inherits:
-
Object
- Object
- FFI::Compiler::Flags
- Defined in:
- lib/ffi-compiler/compile_task.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
- #<<(flag) ⇒ Object
-
#initialize(flags) ⇒ Flags
constructor
A new instance of Flags.
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(flags) ⇒ Flags
Returns a new instance of Flags.
19 20 21 22 |
# File 'lib/ffi-compiler/compile_task.rb', line 19 def initialize(flags) @flags = flags @raw = true # For backward compatibility end |
Instance Attribute Details
#raw ⇒ Object
Returns the value of attribute raw.
17 18 19 |
# File 'lib/ffi-compiler/compile_task.rb', line 17 def raw @raw end |
Instance Method Details
#<<(flag) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/ffi-compiler/compile_task.rb', line 24 def <<(flag) if @raw @flags += shellsplit(flag.to_s) else @flags << flag end end |
#to_a ⇒ Object
32 33 34 |
# File 'lib/ffi-compiler/compile_task.rb', line 32 def to_a @flags end |
#to_s ⇒ Object
36 37 38 |
# File 'lib/ffi-compiler/compile_task.rb', line 36 def to_s shelljoin(@flags) end |