Class: MessagePack::IDL::AST::Namespace
- Defined in:
- lib/msgpack/idl/ast.rb
Instance Attribute Summary collapse
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
Instance Method Summary collapse
-
#initialize(scopes, lang = nil) ⇒ Namespace
constructor
A new instance of Namespace.
- #text ⇒ Object
Methods inherited from Element
Constructor Details
#initialize(scopes, lang = nil) ⇒ Namespace
Returns a new instance of Namespace.
56 57 58 59 |
# File 'lib/msgpack/idl/ast.rb', line 56 def initialize(scopes, lang=nil) @scopes = scopes @lang = lang end |
Instance Attribute Details
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
60 61 62 |
# File 'lib/msgpack/idl/ast.rb', line 60 def lang @lang end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
60 61 62 |
# File 'lib/msgpack/idl/ast.rb', line 60 def scopes @scopes end |
Instance Method Details
#text ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/msgpack/idl/ast.rb', line 62 def text if @lang "namespace #{@lang} #{@scopes.join('.')}" else "namespace #{@scopes.join('.')}" end end |