Class: MessagePack::IDL::AST::Scope
- Defined in:
- lib/msgpack/idl/ast.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #default? ⇒ Boolean
-
#initialize(service, version, name, default) ⇒ Scope
constructor
A new instance of Scope.
- #text ⇒ Object
Methods inherited from Element
Constructor Details
#initialize(service, version, name, default) ⇒ Scope
Returns a new instance of Scope.
243 244 245 246 247 248 |
# File 'lib/msgpack/idl/ast.rb', line 243 def initialize(service, version, name, default) @service = service @version = version @name = name @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
249 250 251 |
# File 'lib/msgpack/idl/ast.rb', line 249 def default @default end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
249 250 251 |
# File 'lib/msgpack/idl/ast.rb', line 249 def name @name end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
249 250 251 |
# File 'lib/msgpack/idl/ast.rb', line 249 def service @service end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
249 250 251 |
# File 'lib/msgpack/idl/ast.rb', line 249 def version @version end |
Instance Method Details
#default? ⇒ Boolean
251 252 253 |
# File 'lib/msgpack/idl/ast.rb', line 251 def default? @default end |
#text ⇒ Object
255 256 257 258 259 |
# File 'lib/msgpack/idl/ast.rb', line 255 def text t = "#{@service}:#{@version} #{@name}" t << " default" if @default t end |