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.



169
170
171
172
173
# File 'lib/review/preprocessor.rb', line 169

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

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



176
177
178
# File 'lib/review/preprocessor.rb', line 176

def args
  @args
end

#opObject (readonly)

Returns the value of attribute op.



175
176
177
# File 'lib/review/preprocessor.rb', line 175

def op
  @op
end

#optsObject (readonly)

Returns the value of attribute opts.



177
178
179
# File 'lib/review/preprocessor.rb', line 177

def opts
  @opts
end

Instance Method Details

#[](key) ⇒ Object



187
188
189
# File 'lib/review/preprocessor.rb', line 187

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

#argObject



179
180
181
# File 'lib/review/preprocessor.rb', line 179

def arg
  @args.first
end

#optObject



183
184
185
# File 'lib/review/preprocessor.rb', line 183

def opt
  @opts.first
end