Class: Flare::IndexBuilder
- Inherits:
-
Object
- Object
- Flare::IndexBuilder
- Defined in:
- lib/flare/index_builder.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Instance Method Summary collapse
- #index ⇒ Object
-
#initialize(&block) ⇒ IndexBuilder
constructor
A new instance of IndexBuilder.
Constructor Details
#initialize(&block) ⇒ IndexBuilder
Returns a new instance of IndexBuilder.
5 6 7 8 9 |
# File 'lib/flare/index_builder.rb', line 5 def initialize(&block) @fields = [] @attributes = {} self.instance_eval(&block) if block_given? end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
3 4 5 |
# File 'lib/flare/index_builder.rb', line 3 def fields @fields end |
Instance Method Details
#index ⇒ Object
11 12 13 |
# File 'lib/flare/index_builder.rb', line 11 def index { :fields => @fields, :attributes => @attributes } end |