Class: SystemRDL::Model::Value

Inherits:
Data
  • Object
show all
Defined in:
lib/systemrdl/model/value.rb

Direct Known Subclasses

HexValue, ReferenceValue

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#instanceObject (readonly)

Returns the value of attribute instance

Returns:

  • (Object)

    the current value of instance



5
6
7
# File 'lib/systemrdl/model/value.rb', line 5

def instance
  @instance
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/systemrdl/model/value.rb', line 5

def name
  @name
end

#token_rangeObject (readonly)

Returns the value of attribute token_range

Returns:

  • (Object)

    the current value of token_range



5
6
7
# File 'lib/systemrdl/model/value.rb', line 5

def token_range
  @token_range
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



5
6
7
# File 'lib/systemrdl/model/value.rb', line 5

def value
  @value
end

Instance Method Details

#full_nameObject



6
7
8
# File 'lib/systemrdl/model/value.rb', line 6

def full_name
  "#{instance.full_name}.#{name}"
end

#inspectObject



14
15
16
# File 'lib/systemrdl/model/value.rb', line 14

def inspect
  to_s
end

#pretty_print(pp) ⇒ Object



18
19
20
21
# File 'lib/systemrdl/model/value.rb', line 18

def pretty_print(pp)
  pp.text("#{name}: ")
  pp_value(pp)
end

#to_sObject



10
11
12
# File 'lib/systemrdl/model/value.rb', line 10

def to_s
  value.to_s
end