Class: ReVIEW::Preprocessor::Directive

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op, args, opts) ⇒ Directive

Returns a new instance of Directive.



190
191
192
193
194
# File 'lib/review/preprocessor.rb', line 190

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



197
198
199
# File 'lib/review/preprocessor.rb', line 197

def args
  @args
end

#opObject (readonly)

Returns the value of attribute op.



196
197
198
# File 'lib/review/preprocessor.rb', line 196

def op
  @op
end

#optsObject (readonly)

Returns the value of attribute opts.



198
199
200
# File 'lib/review/preprocessor.rb', line 198

def opts
  @opts
end

Instance Method Details

#[](key) ⇒ Object



208
209
210
# File 'lib/review/preprocessor.rb', line 208

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

#argObject



200
201
202
# File 'lib/review/preprocessor.rb', line 200

def arg
  @args.first
end

#optObject



204
205
206
# File 'lib/review/preprocessor.rb', line 204

def opt
  @opts.first
end