Module: Jimson::Handler
- Included in:
- Server::System
- Defined in:
- lib/jimson/handler.rb
Instance Method Summary collapse
- #jimson_default_methods ⇒ Object
- #jimson_exclude(*methods) ⇒ Object
- #jimson_expose(*methods) ⇒ Object
- #jimson_exposed_methods ⇒ Object
Instance Method Details
#jimson_default_methods ⇒ Object
4 5 6 |
# File 'lib/jimson/handler.rb', line 4 def jimson_default_methods self.instance_methods.map(&:to_s) - Object.methods.map(&:to_s) end |
#jimson_exclude(*methods) ⇒ Object
13 14 15 16 |
# File 'lib/jimson/handler.rb', line 13 def jimson_exclude(*methods) @jimson_excluded_methods ||= [] @jimson_excluded_methods += methods.map(&:to_s) end |
#jimson_expose(*methods) ⇒ Object
8 9 10 11 |
# File 'lib/jimson/handler.rb', line 8 def jimson_expose(*methods) @jimson_exposed_methods ||= [] @jimson_exposed_methods += methods.map(&:to_s) end |
#jimson_exposed_methods ⇒ Object
18 19 20 21 22 |
# File 'lib/jimson/handler.rb', line 18 def jimson_exposed_methods @jimson_exposed_methods ||= [] @jimson_excluded_methods ||= [] (jimson_default_methods - @jimson_excluded_methods + @jimson_exposed_methods).sort end |