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.



244
245
246
247
248
# File 'lib/review/preprocessor.rb', line 244

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



251
252
253
# File 'lib/review/preprocessor.rb', line 251

def args
  @args
end

#opObject (readonly)

Returns the value of attribute op.



250
251
252
# File 'lib/review/preprocessor.rb', line 250

def op
  @op
end

#optsObject (readonly)

Returns the value of attribute opts.



252
253
254
# File 'lib/review/preprocessor.rb', line 252

def opts
  @opts
end

Instance Method Details

#[](key) ⇒ Object



262
263
264
# File 'lib/review/preprocessor.rb', line 262

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

#argObject



254
255
256
# File 'lib/review/preprocessor.rb', line 254

def arg
  @args.first
end

#optObject



258
259
260
# File 'lib/review/preprocessor.rb', line 258

def opt
  @opts.first
end