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.



205
206
207
208
209
# File 'lib/review/preprocessor.rb', line 205

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



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

def args
  @args
end

#opObject (readonly)

Returns the value of attribute op.



211
212
213
# File 'lib/review/preprocessor.rb', line 211

def op
  @op
end

#optsObject (readonly)

Returns the value of attribute opts.



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

def opts
  @opts
end

Instance Method Details

#[](key) ⇒ Object



223
224
225
# File 'lib/review/preprocessor.rb', line 223

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

#argObject



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

def arg
  @args.first
end

#optObject



219
220
221
# File 'lib/review/preprocessor.rb', line 219

def opt
  @opts.first
end