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
(ns encapsulation.core-test | |
(:use midje.sweet) | |
(:require [clj-time.core :as time])) | |
;My point here is to show how we can achieve encapsulation in clojure | |
;I assume that we may need encapsulation for two purposes: | |
; - Hide the internal representation of data (so that it can change) | |
; - Ensure the consistency of the data (by applying integrity constraints) | |
;Let's say that we have a "class" Person with an age. |
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
<?php | |
trait MetaClass | |
{ | |
protected $__classMethods = array(); | |
static protected $__staticMethods = array(); | |
public function __call($name, $args) | |
{ |
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'; | |
var React = require('react-native'); | |
var { | |
Bundler, | |
StyleSheet, | |
Text, | |
TouchableHighlight, | |
View, | |
ScrollView, |