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.



12
13
14
15
16
# File 'lib/review/preprocessor/directive.rb', line 12

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



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

def args
  @args
end

#opObject (readonly)

Returns the value of attribute op.



18
19
20
# File 'lib/review/preprocessor/directive.rb', line 18

def op
  @op
end

#optsObject (readonly)

Returns the value of attribute opts.



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

def opts
  @opts
end

Instance Method Details

#[](key) ⇒ Object



30
31
32
# File 'lib/review/preprocessor/directive.rb', line 30

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

#argObject



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

def arg
  @args.first
end

#optObject



26
27
28
# File 'lib/review/preprocessor/directive.rb', line 26

def opt
  @opts.first
end