Class: FeatureProof::Proof

Inherits:
Configuration show all
Defined in:
lib/feature_proof.rb

Instance Attribute Summary collapse

Attributes inherited from Configuration

#field, #model, #text_to_display

Instance Method Summary collapse

Constructor Details

#initialize(t_model, t_field, t_text) ⇒ Proof

Returns a new instance of Proof.



27
28
29
30
31
32
# File 'lib/feature_proof.rb', line 27

def initialize(t_model, t_field, t_text)
  @f_model = t_model
  @f_field = t_field
  @f_text_to_display = t_text
  @f_records = (@f_model.camelize.constantize).order(id: :desc).limit(5).reverse
end

Instance Attribute Details

#f_fieldObject

Returns the value of attribute f_field.



25
26
27
# File 'lib/feature_proof.rb', line 25

def f_field
  @f_field
end

#f_modelObject

Returns the value of attribute f_model.



25
26
27
# File 'lib/feature_proof.rb', line 25

def f_model
  @f_model
end

#f_recordsObject

Returns the value of attribute f_records.



25
26
27
# File 'lib/feature_proof.rb', line 25

def f_records
  @f_records
end

#f_text_to_displayObject

Returns the value of attribute f_text_to_display.



25
26
27
# File 'lib/feature_proof.rb', line 25

def f_text_to_display
  @f_text_to_display
end