Module: Rogue
- Defined in:
- lib/rogue.rb,
lib/rogue/version.rb,
lib/rogue/support/mock_methods.rb
Defined Under Namespace
Modules: Support Classes: Error, RogueObject
Constant Summary collapse
- VERSION =
"0.2.1"
Instance Method Summary collapse
-
#obj(properties = Hash.new) ⇒ Object
A special auxillary method that lets you create instances of CustomStruct with properties directly with a one liner eg.
Instance Method Details
#obj(properties = Hash.new) ⇒ Object
A special auxillary method that lets you create instances of CustomStruct with properties directly with a one liner eg. myobj = obj(id: 1, title: ‘First Screen’, click_action: ‘click_to_web’) with this you can do: myobj.title and get ‘First Screen’
37 38 39 |
# File 'lib/rogue.rb', line 37 def obj(properties = Hash.new) RogueObject.new.with_properties(properties) end |