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
// calculator.js | |
(function (root, factory) { | |
if (typeof exports === 'object') { | |
// CommonJS | |
module.exports = factory(); | |
} else if (typeof define === 'function' && define.amd) { | |
// AMD | |
define([], function () { | |
return (root.returnExportsGlobal = factory()); | |
}); |
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
'use strict'; | |
import React from 'react-native'; | |
import { Provider } from 'react-redux/native'; | |
import Routes from '../Routes' | |
import store from '../Store' | |
class App extends React.Component { | |
render() { |
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 Garden | |
def initialize(gardener) | |
@gardener = gardener | |
end | |
end | |
class Gardener | |
def initialize(workday, boots) | |
@workday = workday | |
@boots = boots |
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 Garden | |
def initialize(gardener) | |
gardener.set_workday(Workday.new) | |
gardener.set_boots(BootsWithMassiveStaticInitBlock.new) | |
@gardener = gardener | |
end | |
end | |
class Gardener | |
def set_workday(workday) |
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 House | |
attr_reader :bedroom | |
def initialize(bedroom) | |
@bedroom = bedroom | |
end | |
def enough_space?(people_count) | |
bedroom.beds_count >= people_count | |
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 House | |
attr_reader :bedroom | |
def initialize | |
@bedroom = Bedroom.new | |
end | |
def enough_space?(people_count) | |
bedroom.beds_count >= people_count | |
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 Submission | |
MINIMAL_AGE = 18 | |
attr_accessor :age | |
def can_attend? | |
age > MINIMAL_AGE | |
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
'use strict'; | |
import React from 'react-native'; | |
let { | |
StyleSheet, | |
} = React; | |
let colors = { | |
blue: '#1EC1F7', |
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
'use strict' | |
import Axios from 'axios'; | |
const BASE_URL = 'http://localhost:3000/api'; | |
class ApiConnector { | |
get(path, data = {}) { | |
return Axios.get(`${BASE_URL}${path}`, { params: data }); | |
} |
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
import ActionTypes from '../constants/ActionTypes'; | |
import Connection from '../lib/Connection'; | |
const _requestSubmissionsList = (submissionType) => { | |
return { | |
type: ActionTypes.REQUEST_SUBMISSIONS_LIST, | |
submission_type: submissionType | |
}; | |
} |
NewerOlder