Class: ImportStatement

Inherits:
Node
  • Object
show all
Defined in:
lib/steamd/nodes/import_statement_node.rb

Overview

Represents an import statement

ie: #import “test.steamd”

Instance Method Summary collapse

Instance Method Details

#filename_no_extString

The name not including the extension of the import file

Returns:



16
17
18
# File 'lib/steamd/nodes/import_statement_node.rb', line 16

def filename_no_ext
  File.basename(name, '.*')
end

#nameString

The full name including the extension of the import file

Returns:



9
10
11
# File 'lib/steamd/nodes/import_statement_node.rb', line 9

def name
  filename.text_value
end

#to_hashHash

The hash representation

Returns:

  • (Hash)


23
24
25
# File 'lib/steamd/nodes/import_statement_node.rb', line 23

def to_hash
  { filename: filename_no_ext }
end