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

- (File) initialize(m)

def write(stream)



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

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

Instance Attribute Details

- (Object) entities (readonly)

Returns the value of attribute entities



132
133
134
# File 'lib/autoc/code.rb', line 132

def entities
  @entities
end

Instance Method Details

- (Object) <<(e)



152
153
154
155
# File 'lib/autoc/code.rb', line 152

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

- (Object) generate



143
144
145
146
147
148
149
150
# File 'lib/autoc/code.rb', line 143

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