Class: Scopedog::RecordClass::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/scopedog/record_class.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record_class, yard_obj) ⇒ Scope

Returns a new instance of Scope.

Parameters:



67
68
69
70
# File 'lib/scopedog/record_class.rb', line 67

def initialize(record_class, yard_obj)
  @record_class = record_class
  @yard_obj = yard_obj
end

Instance Attribute Details

#record_classScopedog::RecordClass (readonly)

Returns the current value of record_class.

Returns:



62
63
64
# File 'lib/scopedog/record_class.rb', line 62

def record_class
  @record_class
end

#yard_objYARD::CodeObjects::MethodObject (readonly)

Returns the current value of yard_obj.

Returns:

  • (YARD::CodeObjects::MethodObject)

    the current value of yard_obj



62
63
64
# File 'lib/scopedog/record_class.rb', line 62

def yard_obj
  @yard_obj
end

Instance Method Details

#docstringString

Returns:

  • (String)


78
79
80
# File 'lib/scopedog/record_class.rb', line 78

def docstring
  yard_obj.docstring
end

#nameString

Returns:

  • (String)


73
74
75
# File 'lib/scopedog/record_class.rb', line 73

def name
  yard_obj.name
end

#sqlString

Returns:

  • (String)


83
84
85
# File 'lib/scopedog/record_class.rb', line 83

def sql
  record_class.ar_class.send(name).to_sql
end