Class: MessagePack::IDL::AST::Application

Inherits:
Element
  • Object
show all
Defined in:
lib/msgpack/idl/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Element

#summary

Constructor Details

#initialize(name, scopes) ⇒ Application

Returns a new instance of Application.



226
227
228
229
# File 'lib/msgpack/idl/ast.rb', line 226

def initialize(name, scopes)
	@name = name
	@scopes = scopes
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



231
232
233
# File 'lib/msgpack/idl/ast.rb', line 231

def name
  @name
end

#scopesObject (readonly)

Returns the value of attribute scopes.



232
233
234
# File 'lib/msgpack/idl/ast.rb', line 232

def scopes
  @scopes
end

Instance Method Details

#textObject



234
235
236
237
238
239
# File 'lib/msgpack/idl/ast.rb', line 234

def text
	t = "application #{@name} {\n"
	t << @scopes.map {|sc| "    #{sc.text}\n" }.join
	t << "}"
	t
end