Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/HDLRuby/hruby_high.rb
Overview
Extends the String class for computing conversion to expression.
Instance Method Summary collapse
-
#to_expr ⇒ Object
Convert to a new high-level string expression.
-
#to_value ⇒ Object
Converts to a new high-level value.
-
#to_value? ⇒ Boolean
Tell if the expression can be converted to a value.
Instance Method Details
#to_expr ⇒ Object
Convert to a new high-level string expression
5015 5016 5017 |
# File 'lib/HDLRuby/hruby_high.rb', line 5015 def to_expr return StringE.new(self) end |
#to_value ⇒ Object
Converts to a new high-level value.
5006 5007 5008 5009 5010 5011 5012 |
# File 'lib/HDLRuby/hruby_high.rb', line 5006 def to_value # Convert the string to a bit string. bstr = BitString.new(self) # Use it to create the new value. # return Value.new(Bit[bstr.width],bstr) return Value.new(Bit[self.length],bstr) end |
#to_value? ⇒ Boolean
Tell if the expression can be converted to a value.
5001 5002 5003 |
# File 'lib/HDLRuby/hruby_high.rb', line 5001 def to_value? return true end |