Module: Taksi::Interface::ClassMethods

Defined in:
lib/taksi/interface.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#skeletonObject (readonly)

Returns the value of attribute skeleton.



36
37
38
# File 'lib/taksi/interface.rb', line 36

def skeleton
  @skeleton
end

Instance Method Details

#add(component_class, with: nil) ⇒ Object



48
49
50
# File 'lib/taksi/interface.rb', line 48

def add(component_class, with: nil)
  @components << component_class.new(self, with: with)
end

#alternativesObject



60
61
62
# File 'lib/taksi/interface.rb', line 60

def alternatives
  @interface_definition.alternatives
end

#componentsObject



52
53
54
# File 'lib/taksi/interface.rb', line 52

def components
  @components.each
end

#find(version, alternative = nil) ⇒ Object



38
39
40
# File 'lib/taksi/interface.rb', line 38

def find(version, alternative = nil)
  ::Taksi::Registry.find(@interface_definition.interface_name, version, alternative)
end

#initiate(interface_definition) ⇒ Object



42
43
44
45
46
# File 'lib/taksi/interface.rb', line 42

def initiate(interface_definition)
  @components = []
  @interface_definition = interface_definition
  @skeleton = ::Taksi::Interfaces::Skeleton.new
end

#version_patternObject



56
57
58
# File 'lib/taksi/interface.rb', line 56

def version_pattern
  @interface_definition.version_pattern
end