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.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/blix/rest/request_mapper.rb', line 28 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.
21 22 23 |
# File 'lib/blix/rest/request_mapper.rb', line 21 def blk @blk end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
25 26 27 |
# File 'lib/blix/rest/request_mapper.rb', line 25 def children @children end |
#extract_format ⇒ Object
Returns the value of attribute extract_format.
26 27 28 |
# File 'lib/blix/rest/request_mapper.rb', line 26 def extract_format @extract_format end |
#opts ⇒ Object
Returns the value of attribute opts.
23 24 25 |
# File 'lib/blix/rest/request_mapper.rb', line 23 def opts @opts end |
#parameter ⇒ Object (readonly)
Returns the value of attribute parameter.
24 25 26 |
# File 'lib/blix/rest/request_mapper.rb', line 24 def parameter @parameter end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
22 23 24 |
# File 'lib/blix/rest/request_mapper.rb', line 22 def value @value end |
Instance Method Details
#[](k) ⇒ Object
46 47 48 |
# File 'lib/blix/rest/request_mapper.rb', line 46 def [](k) @children[k] end |
#[]=(k, v) ⇒ Object
50 51 52 |
# File 'lib/blix/rest/request_mapper.rb', line 50 def []=(k, v) @children[k] = v end |