Class: RubyWasm::Target
- Inherits:
-
Object
- Object
- RubyWasm::Target
- Defined in:
- lib/ruby_wasm/build/target.rb
Overview
A build target representation
Instance Attribute Summary collapse
-
#triple ⇒ Object
readonly
Returns the value of attribute triple.
Instance Method Summary collapse
- #cache_key(digest) ⇒ Object
-
#initialize(triple, pic: false) ⇒ Target
constructor
A new instance of Target.
- #pic? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(triple, pic: false) ⇒ Target
Returns a new instance of Target.
6 7 8 9 |
# File 'lib/ruby_wasm/build/target.rb', line 6 def initialize(triple, pic: false) @triple = triple @pic = pic end |
Instance Attribute Details
#triple ⇒ Object (readonly)
Returns the value of attribute triple.
4 5 6 |
# File 'lib/ruby_wasm/build/target.rb', line 4 def triple @triple end |
Instance Method Details
#cache_key(digest) ⇒ Object
19 20 21 22 |
# File 'lib/ruby_wasm/build/target.rb', line 19 def cache_key(digest) digest << @triple digest << "pic" if @pic end |
#pic? ⇒ Boolean
11 12 13 |
# File 'lib/ruby_wasm/build/target.rb', line 11 def pic? @pic end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/ruby_wasm/build/target.rb', line 15 def to_s "#{@triple}#{@pic ? "-pic" : ""}" end |