Method: Interface#initialize

Defined in:
lib/shed/interface.rb

#initialize(string) ⇒ Interface

Returns a new instance of Interface.



18
19
20
21
22
23
24
25
26
# File 'lib/shed/interface.rb', line 18

def initialize(string)
  @doc = Stripper.ecma_comments(string)

  @properties, @methods = {}, {}
  @package, @name = '', ''

  raise "Document is not an interface" unless is_valid
  parse
end