Class: Blix::Rest::RequestMapper::TableNode
- Inherits:
-
Object
- Object
- Blix::Rest::RequestMapper::TableNode
- Defined in:
- lib/blix/rest/request_mapper.rb
Overview
the
Instance Attribute Summary collapse
-
#blk ⇒ Object
Returns the value of attribute blk.
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#extract_format ⇒ Object
Returns the value of attribute extract_format.
-
#opts ⇒ Object
Returns the value of attribute opts.
-
#parameter ⇒ Object
readonly
Returns the value of attribute parameter.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
-
#initialize(name) ⇒ TableNode
constructor
A new instance of TableNode.
Constructor Details
#initialize(name) ⇒ TableNode
Returns a new instance of TableNode.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/blix/rest/request_mapper.rb', line 25 def initialize(name) @children = {} if name[0, 1] == ':' @parameter = name[1..-1].to_sym @value = WILD_PLACEHOLDER elsif name[0, 1] == '*' @parameter = if name[1..-1].empty? :wildpath else name[1..-1].to_sym end @value = STAR_PLACEHOLDER else @value = name end @extract_format = true end |
Instance Attribute Details
#blk ⇒ Object
Returns the value of attribute blk.
18 19 20 |
# File 'lib/blix/rest/request_mapper.rb', line 18 def blk @blk end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
22 23 24 |
# File 'lib/blix/rest/request_mapper.rb', line 22 def children @children end |
#extract_format ⇒ Object
Returns the value of attribute extract_format.
23 24 25 |
# File 'lib/blix/rest/request_mapper.rb', line 23 def extract_format @extract_format end |
#opts ⇒ Object
Returns the value of attribute opts.
20 21 22 |
# File 'lib/blix/rest/request_mapper.rb', line 20 def opts @opts end |
#parameter ⇒ Object (readonly)
Returns the value of attribute parameter.
21 22 23 |
# File 'lib/blix/rest/request_mapper.rb', line 21 def parameter @parameter end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
19 20 21 |
# File 'lib/blix/rest/request_mapper.rb', line 19 def value @value end |
Instance Method Details
#[](k) ⇒ Object
43 44 45 |
# File 'lib/blix/rest/request_mapper.rb', line 43 def [](k) @children[k] end |
#[]=(k, v) ⇒ Object
47 48 49 |
# File 'lib/blix/rest/request_mapper.rb', line 47 def []=(k, v) @children[k] = v end |