Class: Emfrp::Alloc
- Inherits:
-
Object
- Object
- Emfrp::Alloc
- Defined in:
- lib/emfrp/compile/c/alloc.rb
Instance Attribute Summary collapse
-
#h ⇒ Object
readonly
Returns the value of attribute h.
Class Method Summary collapse
Instance Method Summary collapse
- #&(other) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(hash) ⇒ Alloc
constructor
A new instance of Alloc.
- #|(other) ⇒ Object
Constructor Details
#initialize(hash) ⇒ Alloc
Returns a new instance of Alloc.
176 177 178 |
# File 'lib/emfrp/compile/c/alloc.rb', line 176 def initialize(hash) @h = hash end |
Instance Attribute Details
#h ⇒ Object (readonly)
Returns the value of attribute h.
175 176 177 |
# File 'lib/emfrp/compile/c/alloc.rb', line 175 def h @h end |
Class Method Details
.empty ⇒ Object
180 181 182 |
# File 'lib/emfrp/compile/c/alloc.rb', line 180 def self.empty self.new({}) end |
.one(k) ⇒ Object
184 185 186 |
# File 'lib/emfrp/compile/c/alloc.rb', line 184 def self.one(k) self.new(k => 1) end |