Sha256: 3c1f1a531690ce85170e246c2fc601810871c4a359c5cb960c4572c8d43cca00

Contents?: true

Size: 913 Bytes

Versions: 1

Compression:

Stored size: 913 Bytes

Contents

require File.expand_path("../config", __FILE__)
require File.expand_path("../constant", __FILE__)
require File.expand_path("../initializer", __FILE__)
require File.expand_path("../word_for", __FILE__)
require File.expand_path("../authentication", __FILE__)

module WhowishWord
  include WhowishWord::Constant
  include WhowishWord::Initializer
  include WhowishWord::WordFor
  include WhowishWord::Authentication
  
  attr_accessor :words
  
  def init(orm_engine = :active_record)
    
    @orm_engine = orm_engine
    
    init_username_and_password
    run_database_migration
    install_route
    install_hook
    load_rails
    
    words = WhowishWordHtml.all()
      
    @words = {}
    words.each { |word|
      @words[word.word_id] = word.content
    }
    
  end
  
  def add_or_set_word(word_id, content)
    @words[word_id] = content
  end

  extend self
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whowish_word-0.3.0 lib/whowish_word/whowish_word.rb