Class: Normalizr::OptionsParser
- Inherits:
-
Object
- Object
- Normalizr::OptionsParser
- Defined in:
- lib/normalizr/options_parser.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args, block) ⇒ OptionsParser
constructor
A new instance of OptionsParser.
- #post ⇒ Object
- #pre ⇒ Object
Constructor Details
#initialize(args, block) ⇒ OptionsParser
Returns a new instance of OptionsParser.
5 6 7 8 9 |
# File 'lib/normalizr/options_parser.rb', line 5 def initialize(args, block) @options = Hash === args.last ? args.pop : {} @attributes = args @block = block end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/normalizr/options_parser.rb', line 3 def attributes @attributes end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
3 4 5 |
# File 'lib/normalizr/options_parser.rb', line 3 def block @block end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/normalizr/options_parser.rb', line 3 def @options end |
Instance Method Details
#post ⇒ Object
15 16 17 |
# File 'lib/normalizr/options_parser.rb', line 15 def post (:after) end |
#pre ⇒ Object
11 12 13 |
# File 'lib/normalizr/options_parser.rb', line 11 def pre (:with, :before) { block } end |