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.



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

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



214
215
216
# File 'lib/review/preprocessor.rb', line 214

def args
  @args
end

#opObject (readonly)

Returns the value of attribute op.



213
214
215
# File 'lib/review/preprocessor.rb', line 213

def op
  @op
end

#optsObject (readonly)

Returns the value of attribute opts.



215
216
217
# File 'lib/review/preprocessor.rb', line 215

def opts
  @opts
end

Instance Method Details

#[](key) ⇒ Object



225
226
227
# File 'lib/review/preprocessor.rb', line 225

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

#argObject



217
218
219
# File 'lib/review/preprocessor.rb', line 217

def arg
  @args.first
end

#optObject



221
222
223
# File 'lib/review/preprocessor.rb', line 221

def opt
  @opts.first
end