Module: YASM

Defined in:
lib/yasm/task.rb,
lib/yasm/yasm.rb,
lib/yasm/program.rb,
lib/yasm/version.rb

Defined Under Namespace

Classes: Program, Task

Constant Summary collapse

VERSION =

ruby-yasm VERSION

'0.1.0'
@@yasm_parser =
nil
@@yasm_arch =
nil
@@yasm_machine =
nil
@@yasm_debug_format =
nil
@@yasm_output_format =
nil

Class Method Summary collapse

Class Method Details

.archSymbol

The default YASM architecture to assemble for.

Returns:

  • (Symbol)

    The YASM architecture.



41
42
43
# File 'lib/yasm/yasm.rb', line 41

def YASM.arch
  @@yasm_arch
end

.arch=(new_arch) ⇒ Symbol

Sets the default YASM architecture to assemble for.

Parameters:

  • new_arch (Symbol, String)

    The new YASM architecture to assemble for.

Returns:

  • (Symbol)

    The new YASM architecture to assemble for.



54
55
56
57
58
59
60
# File 'lib/yasm/yasm.rb', line 54

def YASM.arch=(new_arch)
  if new_arch.nil?
    @@yasm_arch = nil
  else
    @@yasm_arch = new_arch.to_sym
  end
end

.debug_formatSymbol

The default YASM debugging format to use.

Returns:

  • (Symbol)

    The YASM debugging format.



95
96
97
# File 'lib/yasm/yasm.rb', line 95

def YASM.debug_format
  @@yasm_debug_format
end

.debug_format=(new_format) ⇒ Symbol

Sets the default YASM debugging format to use.

Parameters:

  • new_format (Symbol, String)

    The new YASM debugging format to use.

Returns:

  • (Symbol)

    The new YASM debugging format to use.



108
109
110
111
112
113
114
# File 'lib/yasm/yasm.rb', line 108

def YASM.debug_format=(new_format)
  @@yasm_debug_format = if new_format.nil?
                          nil
                        else
                          new_format.to_sym
                        end
end

.machineSymbol

The default YASM machine to assemble for.

Returns:

  • (Symbol)

    The YASM machine.



68
69
70
# File 'lib/yasm/yasm.rb', line 68

def YASM.machine
  @@yasm_machine ||= nil
end

.machine=(new_machine) ⇒ Symbol

Sets the default YASM machine to assemble for.

Parameters:

  • new_machine (Symbol, String)

    The new YASM machine to assemble for.

Returns:

  • (Symbol)

    The new YASM machine to assemble for.



81
82
83
84
85
86
87
# File 'lib/yasm/yasm.rb', line 81

def YASM.machine=(new_machine)
  @@yasm_machine = if new_machine.nil?
                     nil
                   else
                     new_machine.to_sym
                   end
end

.output_formatSymbol

The default YASM output format to use.

Returns:

  • (Symbol)

    The YASM output format.



122
123
124
# File 'lib/yasm/yasm.rb', line 122

def YASM.output_format
  @@yasm_output_format
end

.output_format=(new_format) ⇒ Symbol

Sets the default YASM output format to use.

Parameters:

  • new_format (Symbol, String)

    The new YASM output format to use.

Returns:

  • (Symbol)

    The new YASM output format to use.



135
136
137
138
139
140
141
# File 'lib/yasm/yasm.rb', line 135

def YASM.output_format=(new_format)
  @@yasm_output_format = if new_format.nil?
                           nil
                         else
                           new_format.to_sym
                         end
end

.parserSymbol

The default YASM parser to use.

Returns:

  • (Symbol)

    The YASM parser.



14
15
16
# File 'lib/yasm/yasm.rb', line 14

def YASM.parser
  @@yasm_parser
end

.parser=(new_parser) ⇒ Symbol

Sets the default YASM parser to use.

Parameters:

  • new_parser (Symbol, String)

    The new YASM parser to use.

Returns:

  • (Symbol)

    The new YASM parser to use.



27
28
29
30
31
32
33
# File 'lib/yasm/yasm.rb', line 27

def YASM.parser=(new_parser)
  @@yasm_parser = if new_parser.nil?
                    nil
                  else
                    new_parser.to_sym
                  end
end