Module: Taksi::Interface::ClassMethods
- Defined in:
- lib/taksi/interface.rb
Instance Attribute Summary collapse
-
#skeleton ⇒ Object
readonly
Returns the value of attribute skeleton.
Instance Method Summary collapse
- #add(component_class, with: nil) ⇒ Object
- #alternatives ⇒ Object
- #components ⇒ Object
- #find(version, alternative = nil) ⇒ Object
- #initiate(interface_definition) ⇒ Object
- #version_pattern ⇒ Object
Instance Attribute Details
#skeleton ⇒ Object (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 |
#alternatives ⇒ Object
60 61 62 |
# File 'lib/taksi/interface.rb', line 60 def alternatives @interface_definition.alternatives end |
#components ⇒ Object
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_pattern ⇒ Object
56 57 58 |
# File 'lib/taksi/interface.rb', line 56 def version_pattern @interface_definition.version_pattern end |