Class: Origen::Limits::LimitSet
- Defined in:
- lib/origen/limits/limit_set.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#max ⇒ Object
Returns the value of attribute max.
-
#min ⇒ Object
Returns the value of attribute min.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#static ⇒ Object
Returns the value of attribute static.
-
#target ⇒ Object
Returns the value of attribute target.
-
#typ ⇒ Object
Returns the value of attribute typ.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #frozen? ⇒ Boolean
-
#initialize(id, owner, options) ⇒ LimitSet
constructor
A new instance of LimitSet.
-
#name ⇒ Object
Common alias.
Constructor Details
#initialize(id, owner, options) ⇒ LimitSet
Returns a new instance of LimitSet.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/origen/limits/limit_set.rb', line 8 def initialize(id, owner, ) @id = id @description = [:description] @owner = owner @min = Limit.new([:min], :min, @owner) unless [:min].nil? @typ = Limit.new([:typ], :typ, @owner) unless [:typ].nil? @max = Limit.new([:max], :max, @owner) unless [:max].nil? @target = Limit.new([:target], :target, @owner) unless [:target].nil? unless [:static].nil? unless [true, false].include? [:static] Origen.log.error("Static option must be set to 'true' or 'false'!") fail end end @static = [:static].nil? ? false : [:static] fail unless limits_ok? end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/origen/limits/limit_set.rb', line 5 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/origen/limits/limit_set.rb', line 5 def id @id end |
#max ⇒ Object
Returns the value of attribute max.
6 7 8 |
# File 'lib/origen/limits/limit_set.rb', line 6 def max @max end |
#min ⇒ Object
Returns the value of attribute min.
6 7 8 |
# File 'lib/origen/limits/limit_set.rb', line 6 def min @min end |
#owner ⇒ Object
Returns the value of attribute owner.
5 6 7 |
# File 'lib/origen/limits/limit_set.rb', line 5 def owner @owner end |
#static ⇒ Object
Returns the value of attribute static.
5 6 7 |
# File 'lib/origen/limits/limit_set.rb', line 5 def static @static end |
#target ⇒ Object
Returns the value of attribute target.
6 7 8 |
# File 'lib/origen/limits/limit_set.rb', line 6 def target @target end |
#typ ⇒ Object
Returns the value of attribute typ.
6 7 8 |
# File 'lib/origen/limits/limit_set.rb', line 6 def typ @typ end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/origen/limits/limit_set.rb', line 5 def type @type end |
Instance Method Details
#frozen? ⇒ Boolean
31 32 33 |
# File 'lib/origen/limits/limit_set.rb', line 31 def frozen? @static end |
#name ⇒ Object
Common alias
27 28 29 |
# File 'lib/origen/limits/limit_set.rb', line 27 def name @id end |