This file contains 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
module PlayingCards | |
class Card | |
class InvalidCardError < RuntimeError | |
end | |
include Comparable | |
attr_reader :rank | |
def initialize(rank, suit) |
This file contains 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
class MyClass | |
attr_reader :name, :age | |
def method_missing(m, attr) | |
if m == :set_name | |
define_method(:set_name) { |attr| @name = attr } | |
@name = attr | |
end | |
if m == :set_age | |
@age = attr | |
end |
This file contains 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
class MyServer < GServer | |
end | |
class Launcher | |
def initialize(servers) | |
@servers = servers | |
end | |
def start | |
@servers.each { |server| server.start } |
This file contains 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
task :update_dev do | |
ALL_DEV.each do |machine| | |
task machine do | |
set :domain, machine | |
end | |
Rake::Task[machine].invoke | |
Rake::Task["vlad:update"].execute | |
end | |
end |
This file contains 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
set | |
{ | |
Interaction.Info("View changed"); | |
var gridSettings = value ?? GridSettings.Default(); | |
_gridSettingsDispatcher.BookFilters = gridSettings.BookFilters; | |
_gridSettingsDispatcher.SortDefinitions = gridSettings.SortDefinitions; | |
_gridSettingsDispatcher.Grouping = gridSettings.Grouping; | |
_gridSettingsDispatcher.ColumnPositions = gridSettings.ColumnPositions.Cast<IColumnDefinition>().ToList(); | |
_gridSettingsDispatcher.ColumnVisibility = SetDictionary(gridSettings.ColumnVisibilty, gridSettings); | |
_gridSettingsDispatcher.ColumnWidths = SetDictionary(gridSettings.ColumnWidths, gridSettings); |
This file contains 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
14 class ScenarioWindowViewModelSpecs : WithFakes | |
15 { | |
16 protected static IClientPipeline IClientPipeline; | |
17 protected static IViewportGridViewModel IViewportGridViewModel; | |
18 protected static IPipelineCollectionViewModel<IPipelineViewport> IPipelineCo llectionViewModel; | |
19 protected static IGridSettingsViewModel IGridSettingsViewModel; | |
20 protected static ScenarioWindowViewModel ScenarioWindowViewModel; | |
21 | |
22 Establish context = () => | |
23 { |
This file contains 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
class ScenarioWindowViewModelSpecs : WithFakes | |
{ | |
protected static IClientPipeline IClientPipeline; | |
protected static IViewportGridViewModel IViewportGridViewModel; | |
protected static IPipelineCollectionViewModel<IPipelineViewport> IPipelineCollectionViewModel; | |
protected static IGridSettingsViewModel IGridSettingsViewModel; | |
protected static ScenarioWindowViewModel ScenarioWindowViewModel; | |
Establish context = () => | |
{ |
This file contains 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
end | |
puts "gone"" | |
# going... | |
# going... | |
# going... | |
# gone |
This file contains 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
# Teddit Contionals - Starter Code. | |
# Let's add a new Teddit feature. Upvotes! | |
# Complete the application below. | |
# Where you see comments (lines that begin with #) replace it with code so that the program works. | |
class Teddit | |
def add_story | |
stories = [] |
This file contains 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
joe@warpaint:~/dev/exercism/ruby/bob$ ruby bob_test.rb | |
######## ######## ######## ####### ######## | |
## ## ## ## ## ## ## ## ## | |
## ## ## ## ## ## ## ## ## | |
###### ######## ######## ## ## ######## | |
## ## ## ## ## ## ## ## ## | |
## ## ## ## ## ## ## ## ## |
OlderNewer