Class: Chelsy::Directive::Include

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location, system: false, **rest) ⇒ Include

Returns a new instance of Include.



1183
1184
1185
1186
1187
1188
# File 'lib/chelsy/ast.rb', line 1183

def initialize(location, system: false, **rest)
  @location = Chelsy.immutable_stringify(location)
  @system = !!system

  super **rest
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



1181
1182
1183
# File 'lib/chelsy/ast.rb', line 1181

def location
  @location
end

Instance Method Details

#system?Boolean

If true, this fragment forms #include <...>. otherwise, this fragment forms #include "...".

Returns:

  • (Boolean)


1192
# File 'lib/chelsy/ast.rb', line 1192

def system?; @system end