This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://github.com/AndyObtiva/glimmer_hangman/blob/master/app/glimmer_hangman/view/hangman_guessed_letters.rb | |
| require 'glimmer_hangman/model/game' | |
| class GlimmerHangman | |
| module View | |
| class HangmanGuessedLetters | |
| include Glimmer::LibUI::CustomShape | |
| option :game | |
| option :size, default: 480 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://github.com/AndyObtiva/glimmer_hangman/blob/master/app/glimmer_hangman/view/hangman_guess.rb | |
| require 'glimmer_hangman/model/game' | |
| class GlimmerHangman | |
| module View | |
| class HangmanGuess | |
| include Glimmer::LibUI::CustomShape | |
| option :game | |
| option :size, default: 480 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://github.com/AndyObtiva/glimmer_hangman/blob/master/app/glimmer_hangman/view/hangman.rb | |
| require 'glimmer_hangman/model/game' | |
| class GlimmerHangman | |
| module View | |
| class HangmanScene | |
| include Glimmer::LibUI::CustomShape | |
| option :game | |
| option :size, default: 480 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://github.com/AndyObtiva/glimmer_hangman/blob/master/app/glimmer_hangman/view/hangman.rb | |
| require 'glimmer_hangman/model/game' | |
| require 'glimmer_hangman/view/hangman_scene' | |
| require 'glimmer_hangman/view/hangman_guess' | |
| require 'glimmer_hangman/view/hangman_guessed_letters' | |
| class GlimmerHangman | |
| module View | |
| class Hangman |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://github.com/AndyObtiva/glimmer_hangman/blob/master/app/glimmer_hangman/model/game.rb | |
| class GlimmerHangman | |
| module Model | |
| class Game | |
| WORDS_FILE_PATH = File.join(APP_ROOT, './config/words.txt') | |
| attr_accessor :word, :guess, :guessed_letters, :incorrect_guess_count | |
| def initialize | |
| load_words |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'glimmer-dsl-web' | |
| Address = Struct.new(:full_name, :street, :street2, :city, :state, :zip_code, keyword_init: true) do | |
| STATES = { | |
| "AK"=>"Alaska", | |
| "AL"=>"Alabama", | |
| "AR"=>"Arkansas", | |
| "AS"=>"American Samoa", | |
| "AZ"=>"Arizona", | |
| "CA"=>"California", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'glimmer-dsl-web' | |
| Address = Struct.new(:full_name, :street, :street2, :city, :state, :zip_code, :billing_and_shipping, keyword_init: true) do | |
| STATES = { | |
| "AK"=>"Alaska", "AL"=>"Alabama", "AR"=>"Arkansas", "AS"=>"American Samoa", "AZ"=>"Arizona", | |
| "CA"=>"California", "CO"=>"Colorado", "CT"=>"Connecticut", "DC"=>"District of Columbia", "DE"=>"Delaware", | |
| "FL"=>"Florida", "GA"=>"Georgia", "GU"=>"Guam", "HI"=>"Hawaii", "IA"=>"Iowa", "ID"=>"Idaho", "IL"=>"Illinois", | |
| "IN"=>"Indiana", "KS"=>"Kansas", "KY"=>"Kentucky", "LA"=>"Louisiana", "MA"=>"Massachusetts", "MD"=>"Maryland", | |
| "ME"=>"Maine", "MI"=>"Michigan", "MN"=>"Minnesota", "MO"=>"Missouri", "MS"=>"Mississippi", "MT"=>"Montana", | |
| "NC"=>"North Carolina", "ND"=>"North Dakota", "NE"=>"Nebraska", "NH"=>"New Hampshire", "NJ"=>"New Jersey", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'glimmer-dsl-web' | |
| Address = Struct.new(:full_name, :street, :street2, :city, :state, :zip_code, :billing_and_shipping, keyword_init: true) do | |
| STATES = { | |
| "AK"=>"Alaska", "AL"=>"Alabama", "AR"=>"Arkansas", "AS"=>"American Samoa", "AZ"=>"Arizona", | |
| "CA"=>"California", "CO"=>"Colorado", "CT"=>"Connecticut", "DC"=>"District of Columbia", "DE"=>"Delaware", | |
| "FL"=>"Florida", "GA"=>"Georgia", "GU"=>"Guam", "HI"=>"Hawaii", "IA"=>"Iowa", "ID"=>"Idaho", "IL"=>"Illinois", | |
| "IN"=>"Indiana", "KS"=>"Kansas", "KY"=>"Kentucky", "LA"=>"Louisiana", "MA"=>"Massachusetts", "MD"=>"Maryland", | |
| "ME"=>"Maine", "MI"=>"Michigan", "MN"=>"Minnesota", "MO"=>"Missouri", "MS"=>"Mississippi", "MT"=>"Montana", | |
| "NC"=>"North Carolina", "ND"=>"North Dakota", "NE"=>"Nebraska", "NH"=>"New Hampshire", "NJ"=>"New Jersey", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://github.com/AndyObtiva/glimmer-dsl-web/blob/master/lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb | |
| Todo = Struct.new(:task, :completed, :editing, :deleted, keyword_init: true) do | |
| alias completed? completed | |
| alias editing? editing | |
| alias deleted? deleted | |
| def active = !completed | |
| alias active? active | |
| def start_editing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://github.com/AndyObtiva/glimmer-dsl-web/blob/master/lib/glimmer-dsl-web/samples/regular/todo_mvc/presenters/todo_presenter.rb | |
| require 'glimmer/data_binding/observer' | |
| require_relative '../models/todo' | |
| class TodoPresenter | |
| FILTERS = [:all, :active, :completed] | |
| FILTER_ROUTE_REGEXP = /\#\/([^\/]*)$/ | |
| attr_accessor :can_clear_completed, :active_todo_count, :created_todo |