Class: Kapusta::HashLit
- Inherits:
-
Object
- Object
- Kapusta::HashLit
- Defined in:
- lib/kapusta/ast.rb
Instance Attribute Summary collapse
-
#pairs ⇒ Object
readonly
Returns the value of attribute pairs.
Instance Method Summary collapse
- #all_sym_keys? ⇒ Boolean
-
#initialize(pairs) ⇒ HashLit
constructor
A new instance of HashLit.
Constructor Details
#initialize(pairs) ⇒ HashLit
Returns a new instance of HashLit.
48 49 50 |
# File 'lib/kapusta/ast.rb', line 48 def initialize(pairs) @pairs = pairs end |
Instance Attribute Details
#pairs ⇒ Object (readonly)
Returns the value of attribute pairs.
46 47 48 |
# File 'lib/kapusta/ast.rb', line 46 def pairs @pairs end |
Instance Method Details
#all_sym_keys? ⇒ Boolean
52 53 54 |
# File 'lib/kapusta/ast.rb', line 52 def all_sym_keys? @pairs.all? { |key, _| key.is_a?(Symbol) } end |