Class: AutoC::Module::File

Inherits:
Object
  • Object
show all
Defined in:
lib/autoc/code.rb

Direct Known Subclasses

Header, Source

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(m) ⇒ File

def write(stream)



144
145
146
147
# File 'lib/autoc/code.rb', line 144

def initialize(m)
  @entities = Set.new
  @module = m
end

Instance Attribute Details

#entitiesObject (readonly)

Returns the value of attribute entities



138
139
140
# File 'lib/autoc/code.rb', line 138

def entities
  @entities
end

Instance Method Details

#<<(e) ⇒ Object



158
159
160
161
# File 'lib/autoc/code.rb', line 158

def <<(e)
  @entities << e
  self
end

#generateObject



149
150
151
152
153
154
155
156
# File 'lib/autoc/code.rb', line 149

def generate
  stream = new_stream
  begin
    write(stream)
  ensure
    stream.close
  end
end