Class: MailBox
Instance Attribute Summary collapse
-
#ghost ⇒ Object
include AlwaysBlock include RedefOpertor.
Attributes inherited from BaseElm
Instance Method Summary collapse
-
#cond_block_proc(a, b = nil) ⇒ Object
redefine cond_block_proc.
- #get(baseelm) ⇒ Object
-
#initialize(name: 'mbox', depth: 100) ⇒ MailBox
constructor
A new instance of MailBox.
- #inst ⇒ Object
-
#put(baseelm) ⇒ Object
def _assign_small_and_eq(b) $tdl_cur_always_env.assign_proc(self,b) end.
- #signal ⇒ Object
- #to_s ⇒ Object
Methods inherited from BaseElm
#matrix, #name_copy, #path_refs, recfg_nc, #s
Methods included from TdlSpace::ExCreateTP
Constructor Details
#initialize(name: 'mbox', depth: 100) ⇒ MailBox
Returns a new instance of MailBox.
7 8 9 10 11 12 |
# File 'lib/tdl/elements/mail_box.rb', line 7 def initialize(name:'mbox',depth:100) @name = name @depth = depth end |
Instance Attribute Details
#ghost ⇒ Object
include AlwaysBlock include RedefOpertor
6 7 8 |
# File 'lib/tdl/elements/mail_box.rb', line 6 def ghost @ghost end |
Instance Method Details
#cond_block_proc(a, b = nil) ⇒ Object
redefine cond_block_proc
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/tdl/elements/mail_box.rb', line 43 def cond_block_proc(a,b=nil) unless a.eql? self super(a,b) else if(b.is_a? Hash) if b[:cond_type].eql? :if_exp exp_element(b[:cond_value]) end elsif b.nil? rel = exp_element(a) if rel =~ /\s+end\s*$/ rel else rel.concat(";") end else exp_element(a).concat(".put(").concat(exp_element(b)).concat(");") end end end |
#get(baseelm) ⇒ Object
36 37 38 39 40 |
# File 'lib/tdl/elements/mail_box.rb', line 36 def get(baseelm) b = "#{signal}.get(#{exp_element(baseelm)})" $__curr_logic_for_expect.last.assign_proc(nil,b) return nil end |
#inst ⇒ Object
22 23 24 |
# File 'lib/tdl/elements/mail_box.rb', line 22 def inst "mailbox #{@name} = new(#{@depth});\n" end |
#put(baseelm) ⇒ Object
def _assign_small_and_eq(b)
$__tdl_cur_always_env__.assign_proc(self,b)
end
30 31 32 33 34 |
# File 'lib/tdl/elements/mail_box.rb', line 30 def put(baseelm) b = "#{signal}.put(#{exp_element(baseelm)})" $__curr_logic_for_expect.last.assign_proc(nil,b) return nil end |
#signal ⇒ Object
14 15 16 |
# File 'lib/tdl/elements/mail_box.rb', line 14 def signal "#{@name}" end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/tdl/elements/mail_box.rb', line 18 def to_s signal end |