Sha256: e44adbb0db529dc8f20c7fb34d27f2bc63a2a16c28f86a22f173237d7932b5da
Contents?: true
Size: 774 Bytes
Versions: 22
Compression:
Stored size: 774 Bytes
Contents
module Vedeu module DSL # Provides methods to be used to define views. # class Stream include Vedeu::DSL include Vedeu::DSL::Presentation include Vedeu::DSL::Text # @param block [Proc] # @raise [Vedeu::Error::RequiresBlock] # @return [void] def stream(&block) fail Vedeu::Error::RequiresBlock unless block_given? model.add(model.class.build(attributes, &block)) end private # Returns the default attributes for the new model. # # Overrides {Vedeu::DSL#attributes}. # # @return [Hash<Symbol => void>] def attributes { client: client, parent: model.parent, } end end # Stream end # DSL end # Vedeu
Version data entries
22 entries across 22 versions & 1 rubygems