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.



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

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_field ⇒ Object

Returns the value of attribute f_field.



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

def f_field
  @f_field
end

#f_model ⇒ Object

Returns the value of attribute f_model.



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

def f_model
  @f_model
end

#f_records ⇒ Object

Returns the value of attribute f_records.



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

def f_records
  @f_records
end

#f_text_to_display ⇒ Object

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