Class: ReVIEW::Preprocessor::Directive
- Defined in:
- lib/review/preprocessor/directive.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#op ⇒ Object
readonly
Returns the value of attribute op.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #arg ⇒ Object
-
#initialize(op, args, opts) ⇒ Directive
constructor
A new instance of Directive.
- #opt ⇒ Object
Constructor Details
#initialize(op, args, opts) ⇒ Directive
Returns a new instance of Directive.
12 13 14 15 16 |
# File 'lib/review/preprocessor/directive.rb', line 12 def initialize(op, args, opts) @op = op @args = args @opts = opts end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
19 20 21 |
# File 'lib/review/preprocessor/directive.rb', line 19 def args @args end |
#op ⇒ Object (readonly)
Returns the value of attribute op.
18 19 20 |
# File 'lib/review/preprocessor/directive.rb', line 18 def op @op end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
20 21 22 |
# File 'lib/review/preprocessor/directive.rb', line 20 def opts @opts end |
Instance Method Details
#[](key) ⇒ Object
30 31 32 |
# File 'lib/review/preprocessor/directive.rb', line 30 def [](key) @opts[key] end |
#arg ⇒ Object
22 23 24 |
# File 'lib/review/preprocessor/directive.rb', line 22 def arg @args.first end |
#opt ⇒ Object
26 27 28 |
# File 'lib/review/preprocessor/directive.rb', line 26 def opt @opts.first end |