Class: LintFu::Plugins::ActiveRecord::ModelEidos

Inherits:
Object
  • Object
show all
Includes:
Eidos
Defined in:
lib/lint_fu/plugins/active_record/model_eidos.rb

Constant Summary

Constants included from Eidos

Eidos::VALID_SEXPS

Instance Attribute Summary collapse

Attributes included from Eidos

#modeled_class_name, #modeled_class_superclass_name, #parent_eidos, #parse_tree

Instance Method Summary collapse

Methods included from Eidos

#to_s

Constructor Details

#initialize(sexp, namespace = nil) ⇒ ModelEidos

Returns a new instance of ModelEidos.



10
11
12
13
14
# File 'lib/lint_fu/plugins/active_record/model_eidos.rb', line 10

def initialize(sexp, namespace=nil)
  super(sexp, namespace)
  @associations = {}
  @named_scopes = {}
end

Instance Attribute Details

#associationsObject (readonly)

Returns the value of attribute associations.



6
7
8
# File 'lib/lint_fu/plugins/active_record/model_eidos.rb', line 6

def associations
  @associations
end

#named_scopesObject (readonly)

Returns the value of attribute named_scopes.



7
8
9
# File 'lib/lint_fu/plugins/active_record/model_eidos.rb', line 7

def named_scopes
  @named_scopes
end

#paranoid=(value) ⇒ Object (writeonly)

Sets the attribute paranoid

Parameters:

  • value

    the value to set the attribute paranoid to.



8
9
10
# File 'lib/lint_fu/plugins/active_record/model_eidos.rb', line 8

def paranoid=(value)
  @paranoid = value
end

Instance Method Details

#paranoid?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/lint_fu/plugins/active_record/model_eidos.rb', line 16

def paranoid?
  !!@paranoid
end