Class: ReVIEW::Preprocessor::Directive

Inherits:
Object
  • Object
show all
Defined in:
lib/review/preprocessor/directive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op, args, opts) ⇒ Directive

Returns a new instance of Directive.



14
15
16
17
18
# File 'lib/review/preprocessor/directive.rb', line 14

def initialize(op, args, opts)
  @op = op
  @args = args
  @opts = opts
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



21
22
23
# File 'lib/review/preprocessor/directive.rb', line 21

def args
  @args
end

#opObject (readonly)

Returns the value of attribute op.



20
21
22
# File 'lib/review/preprocessor/directive.rb', line 20

def op
  @op
end

#optsObject (readonly)

Returns the value of attribute opts.



22
23
24
# File 'lib/review/preprocessor/directive.rb', line 22

def opts
  @opts
end

Instance Method Details

#[](key) ⇒ Object



32
33
34
# File 'lib/review/preprocessor/directive.rb', line 32

def [](key)
  @opts[key]
end

#argObject



24
25
26
# File 'lib/review/preprocessor/directive.rb', line 24

def arg
  @args.first
end

#optObject



28
29
30
# File 'lib/review/preprocessor/directive.rb', line 28

def opt
  @opts.first
end