Class: Chelsy::MemberDesignator

Inherits:
Designator show all
Defined in:
lib/chelsy/ast.rb

Overview

{ .a = 10, .b = 20, ...}

Instance Attribute Summary collapse

Attributes inherited from Element

#fragments, #post_fragments

Instance Method Summary collapse

Constructor Details

#initialize(name, **rest) ⇒ MemberDesignator

Returns a new instance of MemberDesignator.



212
213
214
215
# File 'lib/chelsy/ast.rb', line 212

def initialize(name, **rest)
  @name = Syntax::Ident.ensure(name)
  super **rest
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



210
211
212
# File 'lib/chelsy/ast.rb', line 210

def name
  @name
end