Method: ContractDef#initialize
- Defined in:
- lib/rubidity/builder.rb
#initialize(name, is: [], abstract: false) ⇒ ContractDef
Returns a new instance of ContractDef.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/rubidity/builder.rb', line 89 def initialize( name, is: [], abstract: false ) @name = name @is = if is.is_a?( Symbol ) [is] elsif is.is_a?( Array ) is else raise ArgumentError, "symbol or array expected; got #{is.inspect}" end @abstract = abstract @events = {} @structs = {} @storage = {} @functions = {} end |