Class: FluentAccessors::Runner
- Inherits:
-
Object
- Object
- FluentAccessors::Runner
- Defined in:
- lib/fluent_accessors.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#setter_enabled ⇒ Object
readonly
Returns the value of attribute setter_enabled.
-
#writer_enabled ⇒ Object
readonly
Returns the value of attribute writer_enabled.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(klass, fields, setter_enabled, writer_enabled) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(klass, fields, setter_enabled, writer_enabled) ⇒ Runner
Returns a new instance of Runner.
11 12 13 14 15 16 |
# File 'lib/fluent_accessors.rb', line 11 def initialize(klass, fields, setter_enabled, writer_enabled) @klass = klass @fields = fields @setter_enabled = setter_enabled @writer_enabled = writer_enabled end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
9 10 11 |
# File 'lib/fluent_accessors.rb', line 9 def fields @fields end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
9 10 11 |
# File 'lib/fluent_accessors.rb', line 9 def klass @klass end |
#setter_enabled ⇒ Object (readonly)
Returns the value of attribute setter_enabled.
9 10 11 |
# File 'lib/fluent_accessors.rb', line 9 def setter_enabled @setter_enabled end |
#writer_enabled ⇒ Object (readonly)
Returns the value of attribute writer_enabled.
9 10 11 |
# File 'lib/fluent_accessors.rb', line 9 def writer_enabled @writer_enabled end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 |
# File 'lib/fluent_accessors.rb', line 18 def call create_writer fields.each do |field| deal_with_field(field) end end |