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.
14 15 16 17 18 |
# File 'lib/review/preprocessor/directive.rb', line 14 def initialize(op, args, opts) @op = op @args = args @opts = opts end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
21 22 23 |
# File 'lib/review/preprocessor/directive.rb', line 21 def args @args end |
#op ⇒ Object (readonly)
Returns the value of attribute op.
20 21 22 |
# File 'lib/review/preprocessor/directive.rb', line 20 def op @op end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
22 23 24 |
# File 'lib/review/preprocessor/directive.rb', line 22 def opts @opts end |
Instance Method Details
#[](key) ⇒ Object
32 33 34 |
# File 'lib/review/preprocessor/directive.rb', line 32 def [](key) @opts[key] end |
#arg ⇒ Object
24 25 26 |
# File 'lib/review/preprocessor/directive.rb', line 24 def arg @args.first end |
#opt ⇒ Object
28 29 30 |
# File 'lib/review/preprocessor/directive.rb', line 28 def opt @opts.first end |