Class: RailsClafer::RefClafer

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_clafer/ref_clafer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ref_name, type_clafer, card) ⇒ RefClafer

Returns a new instance of RefClafer.



9
10
11
12
13
# File 'lib/rails_clafer/ref_clafer.rb', line 9

def initialize(ref_name, type_clafer, card)
  @ref_name, @clafer= ref_name, type_clafer
  @card = card
  @gcard = GCard.new
end

Instance Attribute Details

#cardObject

Returns the value of attribute card.



8
9
10
# File 'lib/rails_clafer/ref_clafer.rb', line 8

def card
  @card
end

#claferObject

Returns the value of attribute clafer.



8
9
10
# File 'lib/rails_clafer/ref_clafer.rb', line 8

def clafer
  @clafer
end

#constraintObject

Returns the value of attribute constraint.



8
9
10
# File 'lib/rails_clafer/ref_clafer.rb', line 8

def constraint
  @constraint
end

#gcardObject

Returns the value of attribute gcard.



8
9
10
# File 'lib/rails_clafer/ref_clafer.rb', line 8

def gcard
  @gcard
end

#ref_nameObject

Returns the value of attribute ref_name.



8
9
10
# File 'lib/rails_clafer/ref_clafer.rb', line 8

def ref_name
  @ref_name
end

Class Method Details

.from_assoc(assoc, type_clafer) ⇒ Object



4
5
6
# File 'lib/rails_clafer/ref_clafer.rb', line 4

def from_assoc(assoc, type_clafer)
  new assoc.ref_name, type_clafer, assoc.dst_card 
end

Instance Method Details

#clafer_nameObject



14
15
16
# File 'lib/rails_clafer/ref_clafer.rb', line 14

def clafer_name
  @clafer.name	
end