Class: Jeka::Implementation
- Inherits:
-
Object
- Object
- Jeka::Implementation
- Defined in:
- lib/jeka/implementation.rb
Instance Attribute Summary collapse
-
#compiler ⇒ Object
Returns the value of attribute compiler.
-
#database ⇒ Object
readonly
Returns the value of attribute database.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #information ⇒ Object
- #information=(info) ⇒ Object
-
#initialize(name) ⇒ Implementation
constructor
A new instance of Implementation.
- #jekafy ⇒ Object
Constructor Details
#initialize(name) ⇒ Implementation
Returns a new instance of Implementation.
9 10 11 12 |
# File 'lib/jeka/implementation.rb', line 9 def initialize(name) @name = name @information = {} end |
Instance Attribute Details
#compiler ⇒ Object
Returns the value of attribute compiler.
7 8 9 |
# File 'lib/jeka/implementation.rb', line 7 def compiler @compiler end |
#database ⇒ Object (readonly)
Returns the value of attribute database.
5 6 7 |
# File 'lib/jeka/implementation.rb', line 5 def database @database end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/jeka/implementation.rb', line 6 def name @name end |
Instance Method Details
#information ⇒ Object
23 24 25 |
# File 'lib/jeka/implementation.rb', line 23 def information @information end |
#information=(info) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/jeka/implementation.rb', line 14 def information=(info) if info.kind_of? Hash @information = info else @yaml = YAML::load(File.open(info)) @yaml.each_key {|key| @information[key.to_sym] = @yaml[key]} end end |
#jekafy ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/jeka/implementation.rb', line 27 def jekafy @database = Jeka::Analysis::Implementation.create!( name: @name, compiler: @compiler.jekafy, implementation_information: Jeka::Analysis::ImplementationInformation.convert(@information) ) end |