Class: RubyHDL::High::Value
- Inherits:
-
Expression
- Object
- Expression
- RubyHDL::High::Value
- Defined in:
- lib/HDLRuby/std/sequencer_sw.rb
Overview
Describes the software implementation of a value.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Attributes inherited from Expression
Instance Method Summary collapse
-
#initialize(type, content) ⇒ Value
constructor
Create a new value with +type+ data type and content +content+.
-
#to_ruby ⇒ Object
(also: #to_c)
Convert to Ruby code.
-
#to_value ⇒ Object
Compute the expression (convert it to a value).
Methods inherited from Expression
#<=, #[], #mux, #sdownto, #seach, #stimes, #supto, #to_expr
Constructor Details
#initialize(type, content) ⇒ Value
Create a new value with +type+ data type and content +content+.
1892 1893 1894 1895 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1892 def initialize(type,content) super(type) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
1889 1890 1891 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1889 def content @content end |
Instance Method Details
#to_ruby ⇒ Object Also known as: to_c
Convert to Ruby code.
1903 1904 1905 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1903 def to_ruby return @content.to_s end |
#to_value ⇒ Object
Compute the expression (convert it to a value).
1898 1899 1900 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1898 def to_value return self end |