Class: Faith::Mixin

Inherits:
Object
  • Object
show all
Includes:
Named
Defined in:
lib/faith/mixin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Named

#full_name, #root?

Constructor Details

#initialize(name, parent, before: nil, after: nil) ⇒ Mixin

Returns a new instance of Mixin.



3
4
5
6
7
8
# File 'lib/faith/mixin.rb', line 3

def initialize(name, parent, before: nil, after: nil)
  @name = name
  @parent = parent
  @before = before
  @after = after
end

Instance Attribute Details

#afterObject

Returns the value of attribute after.



10
11
12
# File 'lib/faith/mixin.rb', line 10

def after
  @after
end

#beforeObject

Returns the value of attribute before.



10
11
12
# File 'lib/faith/mixin.rb', line 10

def before
  @before
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/faith/mixin.rb', line 10

def name
  @name
end

#parentObject

Returns the value of attribute parent.



10
11
12
# File 'lib/faith/mixin.rb', line 10

def parent
  @parent
end

Instance Method Details

#instantiate(context) ⇒ Object



14
15
16
# File 'lib/faith/mixin.rb', line 14

def instantiate(context)
  MixinInstance.new(self)
end

#resolve_self!Object



18
# File 'lib/faith/mixin.rb', line 18

def resolve_self!; end