Module: AskAwesomely::DSL
- Defined in:
- lib/ask_awesomely/dsl.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
61 62 63 |
# File 'lib/ask_awesomely/dsl.rb', line 61 def context @context end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
61 62 63 |
# File 'lib/ask_awesomely/dsl.rb', line 61 def json @json end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
61 62 63 |
# File 'lib/ask_awesomely/dsl.rb', line 61 def state @state end |
Class Method Details
.included(recv) ⇒ Object
4 5 6 7 |
# File 'lib/ask_awesomely/dsl.rb', line 4 def self.included(recv) recv.extend(ClassMethods) recv.include(JsonBuilder) end |
Instance Method Details
#to_json ⇒ Object
63 64 65 66 |
# File 'lib/ask_awesomely/dsl.rb', line 63 def to_json warn_if_no_webhook_set build_json(context).to_json end |