Sha256: 59f15ab17ec8b48e9cfc17900800e75ac1297dbbf50c06c93df89dfd697bdac1

Contents?: true

Size: 1.83 KB

Versions: 9

Compression:

Stored size: 1.83 KB

Contents

########    #######    ########    #######    ########    ########
##     / / / /    License    \ \ \ \ 
##    Copyleft culture, Copyright (C) is prohibited here
##    This work is licensed under a CC BY-SA 4.0
##    Creative Commons Attribution-ShareAlike 4.0 License
##    Refer to the http://creativecommons.org/licenses/by-sa/4.0/
########    #######    ########    #######    ########    ########
##    / / / /    Code Climate    \ \ \ \ 
##    Language = ruby
##    Indent = space;    4 chars;
########    #######    ########    #######    ########    ########
module ArchestryLookup
  module Lookup
    class << self
      
      def dialog_folder_lookup(args, state)      
        folderDialog = sqlQuery(state, "select id from folders where name in ('#{state[:myAppName]}') and id in ('#{conFolder[0]}')")[0]
        if folderDialog.is_a?(Array)
          sqlQuery(state, "select view_id as view_id2, view_version, model_version from views_in_model where parent_folder_id in ('#{folderDialog[0]}') and model_version = (select max(model_version) from views_in_model where view_id in (view_id2))") do |row|
            viewAtr = sqlQuery(state, "select name, version from views where id in ('#{row[0]}') and version = (select max(version) from views where id in ('#{row[0]}'))")
            if row[1] == viewAtr[0][1]
              id = row[0].tr("-", "_")

              args[:views][id] ||= {}
              args[:views][id][:version] = row[1]
              args[:views][id][:name] = state[:dialectFolder]
              ArchestryLookup.logger.info "ArchestryLookup functional view '#{viewAtr[0][0]}' (id #{id}, view ver.#{row[1]}, model ver.#{row[2]}) suits for me!"
#                of interface '#{Dialog.config.naming.interface}' for bot '#{Dialog.config.naming.instance}' 
            end
          end           
        end
      end
      
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
archestry_lookup-0.0.19 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.18 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.17 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.16 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.15 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.14 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.13 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.12 lib/context/_refactor_dialog/folder_lookup.rb
archestry_lookup-0.0.11 lib/context/_refactor_dialog/folder_lookup.rb