Class: Praxis::Mapper::SelectorGenerator
- Inherits:
-
Object
- Object
- Praxis::Mapper::SelectorGenerator
- Defined in:
- lib/praxis/mapper/selector_generator.rb
Overview
Generates a set of selectors given a resource and list of resource attributes.
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
310 311 312 |
# File 'lib/praxis/mapper/selector_generator.rb', line 310 def root @root end |
Instance Method Details
#add(resource, fields) ⇒ Object
Entry point
313 314 315 316 317 |
# File 'lib/praxis/mapper/selector_generator.rb', line 313 def add(resource, fields) @root = SelectorGeneratorNode.new(resource) @root.add(fields) self end |
#inspect ⇒ Object
323 324 325 |
# File 'lib/praxis/mapper/selector_generator.rb', line 323 def inspect "#<#{self.class} @resource=#{@resource.name.inspect} @select=#{@select.inspect} @select_star=#{@select_star.inspect} @tracking.keys=#{@tracks.keys} (recursion omitted)>" end |
#selectors ⇒ Object
319 320 321 |
# File 'lib/praxis/mapper/selector_generator.rb', line 319 def selectors @root end |