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_relative '../entities/user' | |
require_relative '../entities/user_session' | |
class SignInUser | |
def initialize user_jack, user_session_jack | |
@user_jack = user_jack | |
@user_session_jack = user_session_jack | |
end |
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
Action: ExampleAction | |
Description: should do something awesome | |
Code: | |
- c: validate input | |
- c: set default id and values for new Thing entity | |
- c: create/populate Thing object | |
requires: Thing.populate | |
- c: save thing to jack | |
requires: ThingJack.save, Thing.to_hash | |
- c: return the result |
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
<div class="alert error" data-bind="css: { hidden: !errorMessage() }"> | |
<span data-bind="text: errorMessage"></span> | |
<button class="close" data-bind="click: function(data, event){ errorMessage(null); } ">×</button> | |
</div> |
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_relative '../../contracts/tweet_gateway_contract' | |
class TG < TweetGatewayContract | |
def save input | |
return input | |
end | |
end | |
class TGoutput < TweetGatewayContract | |
def save input |
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
class Contract | |
@@disable_override = false | |
@@contracts = [] | |
def self.method_added name | |
unless @@disable_override | |
@@contracts.each do |method| | |
if name == method.to_sym | |
method_alias = "#{method}_alias".to_sym |
NewerOlder