Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/graffle/nodoc/hacks.rb
Class Method Summary collapse
Instance Method Summary collapse
- #behave_like(mod) ⇒ Object (also: #and_behave_like)
- #behaves_like?(mod) ⇒ Boolean
Class Method Details
.inspect ⇒ Object
32 33 34 |
# File 'lib/graffle/nodoc/hacks.rb', line 32 def self.inspect @_stereotype_print_tag__bemhack + @_original_inspect__bemhack.call end |
.pretty_print(printer) ⇒ Object
42 43 44 45 |
# File 'lib/graffle/nodoc/hacks.rb', line 42 def self.pretty_print(printer) printer.text(@_stereotype_print_tag__bemhack) @_original_pretty_print__bemhack.call(printer) end |
.stereotype ⇒ Object
17 |
# File 'lib/graffle/nodoc/hacks.rb', line 17 def self.stereotype; @_stereotyped_as_module__bemhack; end |
.to_s ⇒ Object
37 38 39 |
# File 'lib/graffle/nodoc/hacks.rb', line 37 def self.to_s @_stereotype_print_tag__bemhack + @_original_to_s__bemhack.call end |
Instance Method Details
#behave_like(mod) ⇒ Object Also known as: and_behave_like
15 16 17 18 19 20 21 22 23 |
# File 'lib/graffle/nodoc/hacks.rb', line 15 def behave_like(mod) @_stereotyped_as_module__bemhack = mod def self.stereotype; @_stereotyped_as_module__bemhack; end _cause_printing_to_include_stereotype__bemhack extend(self.stereotype) self end |
#behaves_like?(mod) ⇒ Boolean
11 12 13 |
# File 'lib/graffle/nodoc/hacks.rb', line 11 def behaves_like?(mod) kind_of?(mod) end |