Sha256: 6db7bd9f41a8f95c53b019db988b62f413bf621cd208d2cf9963f71fe6b6b3ae
Contents?: true
Size: 1.27 KB
Versions: 5
Compression:
Stored size: 1.27 KB
Contents
Lanes.Test.makeScreen = (props = {}, args = {}) -> class TestScreen render: -> React.createElement('div', 'hello screen') _.extend(TestScreen.prototype, props) Screen = Lanes.React.Screen.extend(TestScreen) Lanes.Test.renderComponent(Screen, props: args) Lanes.Test.makeComponent = (props = {}, args = {}) -> class TestComponent render: -> React.createElement('div', 'hello component') _.extend(TestComponent.prototype, props) Component = Lanes.React.Component.extend(TestComponent) Lanes.Test.renderComponent(Component, props: args) Lanes.Test.defineModel = (props = {}) -> class TestModel constructor: -> super _.extend(TestModel.prototype, props) Lanes.Models.Base.extend(TestModel) Lanes.Test.makeModel = (props = {}, args = {}, options = {}) -> Model = Lanes.Test.defineModel(props) return new Model(args, options) Lanes.Test.makeCollection = (props = {}, args = {}) -> class TestCollection constructor: -> super _.extend(TestCollection.prototype, props) unless TestCollection::model class TestModel constructor: -> super TestCollection::model = Lanes.Models.Base.extend(TestModel) Lanes.Models.Collection.extend(TestCollection) return new TestCollection(args)
Version data entries
5 entries across 5 versions & 1 rubygems